Skip to content

Commit bd4c2b0

Browse files
committed
chore: update docker-compose for portainer stack and refine deployment docs
1 parent 488ed9c commit bd4c2b0

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

docker-compose.prod.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
db:
1111
condition: service_healthy
1212
env_file:
13-
- .env
13+
- stack.env
1414
environment:
1515
GDAL_LIBRARY_PATH: /usr/lib/x86_64-linux-gnu/libgdal.so
1616
command: >
@@ -25,10 +25,14 @@ services:
2525
- static_volume:/app/static
2626
depends_on:
2727
- web
28+
env_file:
29+
- stack.env
2830
tailscale:
2931
image: tailscale/tailscale:latest
3032
container_name: tailscale
3133
hostname: ${TS_HOSTNAME:-kc3hack-2026-team14}
34+
env_file:
35+
- stack.env
3236
environment:
3337
- TS_AUTHKEY=${TS_AUTHKEY}
3438
- TS_STATE_DIR=/var/lib/tailscale
@@ -56,6 +60,8 @@ services:
5660
- postgres_data:/var/lib/postgresql/data
5761
expose:
5862
- "5432"
63+
env_file:
64+
- stack.env
5965
healthcheck:
6066
test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}" ]
6167
interval: 5s
@@ -69,6 +75,8 @@ services:
6975
expose:
7076
- "9000"
7177
- "9001"
78+
env_file:
79+
- stack.env
7280
command: server /data --console-address ":9001"
7381
healthcheck:
7482
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
@@ -80,13 +88,17 @@ services:
8088
depends_on:
8189
minio:
8290
condition: service_healthy
91+
env_file:
92+
- stack.env
8393
entrypoint: >
8494
/bin/sh -c " until mc alias set myminio http://minio:9000 \${MINIO_ROOT_USER} \${MINIO_ROOT_PASSWORD}; do echo 'Waiting...'; sleep 1; done; mc mb myminio/\${MINIO_BUCKET_NAME} || true; mc anonymous set download myminio/\${MINIO_BUCKET_NAME}; exit 0; "
8595
8696
watchtower:
8797
image: containrrr/watchtower
8898
volumes:
8999
- /var/run/docker.sock:/var/run/docker.sock
100+
env_file:
101+
- stack.env
90102
environment:
91103
DOCKER_API_VERSION: "1.44"
92104
REPO_USER: ${GH_USERNAME}

docs/deployment.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,24 @@
1313
1. GitHub の [Personal Access Tokens](https://github.com/settings/tokens) (Classic) で `read:packages` 権限を持つトークンを作成
1414
2. サーバー上で以下のコマンドを実行して GHCR にログイン
1515
```bash
16+
```
1617
echo "YOUR_PAT" | docker login ghcr.io -u YOUR_GITHUB_USERNAME --password-stdin
1718
```
1819
20+
## Portainer へのレジストリ追加
21+
22+
1. Portainer にログインし、左メニューの Settings -> Registries を選択
23+
2. Add registry をクリック
24+
3. Custom registry を選択
25+
4. 以下の情報を入力:
26+
- Name: `GitHub Container Registry` (任意の名前)
27+
- Registry URL: `ghcr.io`
28+
- Authentication: ON
29+
- Username: GitHubのユーザー名
30+
- Password: GitHubのPersonal Access Token (PAT)
31+
5. Add registry をクリック
32+
33+
1934
## デプロイ手順
2035
2136
1. Portainer にログイン

0 commit comments

Comments
 (0)