{"id":24929798,"url":"https://github.com/traptitech/piscon-portal-v2","last_synced_at":"2025-09-14T20:15:37.014Z","repository":{"id":267807924,"uuid":"901854753","full_name":"traPtitech/piscon-portal-v2","owner":"traPtitech","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-22T03:20:25.000Z","size":569,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T04:20:47.756Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/traPtitech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-11T12:48:22.000Z","updated_at":"2025-03-19T10:00:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"02ea436a-9a68-47b7-ad89-6692bf8e1d58","html_url":"https://github.com/traPtitech/piscon-portal-v2","commit_stats":null,"previous_names":["traptitech/piscon-portal-v2"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traPtitech%2Fpiscon-portal-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traPtitech%2Fpiscon-portal-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traPtitech%2Fpiscon-portal-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traPtitech%2Fpiscon-portal-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/traPtitech","download_url":"https://codeload.github.com/traPtitech/piscon-portal-v2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246036820,"owners_count":20713300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-02T13:51:54.151Z","updated_at":"2025-09-14T20:15:36.999Z","avatar_url":"https://github.com/traPtitech.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# piscon-portal-v2\n\n## 開発環境\nプロジェクトルートディレクトリに以下のように `.env` ファイルを用意してください。`CLIENT_ID`と`CLIENT_SECRET`はtraQのものです。\n```\nDB_USER=root\nDB_PASSWORD=password\nDB_HOST=db\nDB_PORT=3306\nDB_NAME=portal\n\nROOT_URL=http://localhost:8080\n\nSESSION_SECRET=secret\n\nCLIENT_ID=my-client-id\nCLIENT_SECRET=my-client-secret\n```\ntraQで作成するClientは リダイレクトURL に `http://localhost:8080/api/oauth2/callback`、スコープに `openid`, `profile` を指定します。\n`task up` で portal server が 8080番 ポートで起動します。`task dev` でホットリロード付きで起動します。\n\nGo 1.24で入った experimental な機能である `testing/synctest` を [runner/runner_test.go](runner/runner_test.go) で使っています。2025/2/26時点でこれを動かすためには、環境変数で `GOEXPERIMENT=synctest` を設定する必要があります。VSCode であれば、 `.vscode/settings.json` に\n\n```json\n{\n  \"go.toolsEnvVars\": {\n    \"GOEXPERIMENT\": \"synctest\"\n  }\n}\n```\n\nを書き込むことで環境変数を設定できます。\n\n### AWS を使ったローカルでの動作\n\nポータルをローカルのdocker composeで動かし、AWSのインスタンスを操作するには、以下のような設定を行います。\n\n#### 1. AWS CLI のインストール\n\nAWS CLI をインストールします。\n\n#### 2. AWS の認証情報の設定\n\nAWS CLIを使って認証のプロファイルを設定します。`~/.aws/config` と `~/.aws/credentials` ファイルが作成されます。\n\n#### 3. `.env` への追記\n\n`.env` ファイルに以下のように追記します。\n\n```dotenv\nAWS_IMAGE_ID=ami-002d61d6436f85f12 # private-isu の AMI の ID\nAWS_INSTANCE_TYPE=c7a.large\nAWS_REGION=ap-northeast-1\nAWS_SUBNET_ID={{ AWS の Subnet ID }}\nAWS_SECURITY_GROUP_ID={{ AWS の Security Group ID }}\nAWS_KEY_PAIR_NAME={{ AWS の Key Pair 名 }}\n\nINSTANCE_MANAGER=aws\n\nAWS_PROFILE={{ 2で用意した AWS のプロファイル名 }}\nAWS_SHARED_CREDENTIALS_FILE=/app/.aws/credentials\nAWS_CONFIG_FILE=/app/.aws/config\nAWS_SDK_LOAD_CONFIG=true\n```\n\n#### 4. 起動\n\n```bash\ndocker compose --file compose.aws.yaml up\n```\n\n## protobuf について\n\n[proto/README.md](proto/README.md) を参照してください。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraptitech%2Fpiscon-portal-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftraptitech%2Fpiscon-portal-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraptitech%2Fpiscon-portal-v2/lists"}