{"id":22910266,"url":"https://github.com/seo-4d696b75/station-service","last_synced_at":"2026-05-09T15:09:37.086Z","repository":{"id":38386037,"uuid":"308810276","full_name":"Seo-4d696b75/station-service","owner":"Seo-4d696b75","description":"日本全国の駅・路線データを取得できるREST API","archived":false,"fork":false,"pushed_at":"2024-03-29T14:19:19.000Z","size":326,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T05:41:20.585Z","etag":null,"topics":["docker","fastapi","python","rest-api"],"latest_commit_sha":null,"homepage":"https://api.station.seo4d696b75.com/","language":"Python","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/Seo-4d696b75.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":"2020-10-31T05:23:32.000Z","updated_at":"2024-03-26T15:28:20.000Z","dependencies_parsed_at":"2024-12-14T03:42:46.434Z","dependency_job_id":"16351c44-13b2-4761-8167-17780d5f670d","html_url":"https://github.com/Seo-4d696b75/station-service","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seo-4d696b75%2Fstation-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seo-4d696b75%2Fstation-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seo-4d696b75%2Fstation-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Seo-4d696b75%2Fstation-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Seo-4d696b75","download_url":"https://codeload.github.com/Seo-4d696b75/station-service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246622326,"owners_count":20807124,"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":["docker","fastapi","python","rest-api"],"created_at":"2024-12-14T03:42:43.900Z","updated_at":"2026-05-09T15:09:32.048Z","avatar_url":"https://github.com/Seo-4d696b75.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Station-Service\r\n\r\n日本中の駅・路線データを簡単に取得できるREST APIです\r\n\r\n- URL：https://api.station.seo4d696b75.com/\r\n- [各エンドポイントの詳細はSwagger UIを参照してください](https://api.station.seo4d696b75.com/docs)\r\n\r\n\u003cimg src=\"https://user-images.githubusercontent.com/25225028/172044813-31d2d023-f2d6-4752-b63c-c235acdc9708.png\" width=\"500\"\u003e\r\n\r\n### データのソース\r\nAPIが扱うデータは[GitHub station_database](https://github.com/Seo-4d696b75/station_database)で管理されています.\r\n\r\n### データの更新\r\nGoogle Cloud Run のサービスは外部から再起動できない？ので、  \r\n同じContainerイメージのまま新しいリビジョンで再デプロイする\r\n\r\n\r\n### 使用技術\r\n\u003cimg src=\"https://user-images.githubusercontent.com/25225028/172044935-c49dce60-9a98-401b-8857-a51e8bad6f8f.png\" height=\"120\"/\u003e\u003cimg src=\"https://user-images.githubusercontent.com/25225028/198833805-195dcb64-0d4c-4db6-ab30-d65e787a242a.png\" height=\"120\"/\u003e\r\n\r\n\u003cimg src=\"https://user-images.githubusercontent.com/25225028/172044953-39a930eb-59ee-453e-8f1b-1da04e7cc4f0.png\" height=\"120\"/\u003e\r\n\r\nHeroku から Google Cloud Run にデプロイ先を変更しました  \r\n\r\n\u003cimg src=\"https://user-images.githubusercontent.com/25225028/198833929-a04f637b-ac0b-4f44-a3a4-3852c7a71d3a.png\" width=\"400\"/\u003e\r\n\r\n# 開発\r\n\r\n\r\n## Dockerコンテナ環境（デプロイあり）\r\nGoogle Cloud Runにデプロイするのに必要です\r\n\r\n### gcloud CLIのセットアップ\r\n\r\nリージョン指定は適宜読み替えて下さい\r\n\r\n1. [インストール](https://cloud.google.com/sdk/docs/install?hl=ja)\r\n2. Google Cloudを利用するアカウントでログイン\r\n```bash\r\ngcloud auth login\r\n```\r\n\r\n3. プロジェクトの指定\r\n```bash\r\ngcloud config set project ${PROJECT_ID}\r\ngcloud config set run/region asia-northeast1\r\n```\r\n\r\n4. Dockerに認証情報をセット\r\n\r\n```bash\r\ngcloud auth configure-docker asia-northeast1-docker.pkg.dev\r\n```\r\n\r\n### イメージのbuild\r\n\r\n1. Docker Desktopなどで使用する場合\r\n\r\n```bash\r\ndocker build -t ${local_name}:${local_tag} . \r\n```\r\n\r\n2. GCRにデプロイする場合\r\n\r\n```bash\r\ndocker build -t ${local_name}:${local_tag} . --platform linux/amd64\r\n```\r\n\r\n### イメージのPush\r\n[Google Artifact Registryを利用します](https://cloud.google.com/artifact-registry/docs/docker/pushing-and-pulling?hl=ja)\r\n\r\n`tag=asia-northeast1-docker.pkg.dev/${project_id}/${repo}/${remote_name}:${remote_tag}`\r\n\r\n```bash\r\ndocker tag ${local_name}:${local_tag} $tag\r\ndocker push $tag\r\n```\r\n\r\n### Google Cloud Runへのデプロイ\r\n[Google Cloud Consoleから操作できます](https://cloud.google.com/run/docs/deploying?hl=ja#revision)\r\n\r\n\r\n\r\n##　Conda環境（デプロイなし）\r\n\r\nローカルで手軽に実行・開発するのに便利です\r\n\r\n**注意** HerokuからGoogle Cloud Runへの移行に伴いデプロイにはDockerイメージのビルドが必要です\r\n\r\n### 環境のセットアップ\r\n```bash\r\nconda create --name station-service python=3.12\r\nconda activate station-service\r\npip install -r requirements.txt\r\n```\r\n\r\n### ローカル実行\r\n```bash\r\nuvicorn main:app --host 0.0.0.0 --port 3003 --reload\r\n```\r\n\r\n### VSCodeのデバッグ設定\r\n```json\r\n{\r\n  \"python.condaPath\": \"/Users/${you}/opt/anaconda3/condabin/conda\",\r\n  \"python.defaultInterpreterPath\": \"/Users/${you}/opt/anaconda3/envs/station-service/bin/python\"\r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseo-4d696b75%2Fstation-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseo-4d696b75%2Fstation-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseo-4d696b75%2Fstation-service/lists"}