Skip to content

Commit 488ed9c

Browse files
committed
chore: support private GHCR packages, update configuration and deployment docs
1 parent d9e1d70 commit 488ed9c

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ MINIO_ENDPOINT_URL=http://localhost:9000
1717

1818
TS_AUTHKEY=tskey-auth-xxxxxx-xxxxxx
1919
TS_HOSTNAME=kc3hack-2026-team14
20+
21+
# GitHub Container Registry (for Watchtower)
22+
GH_USERNAME=your-github-username
23+
GH_PAT=ghp_your_personal_access_token

docker-compose.prod.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ services:
8989
- /var/run/docker.sock:/var/run/docker.sock
9090
environment:
9191
DOCKER_API_VERSION: "1.44"
92+
REPO_USER: ${GH_USERNAME}
93+
REPO_PASS: ${GH_PAT}
9294
command: --label-enable --interval 60 --cleanup
9395
restart: always
9496
volumes:

docs/deployment.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,17 @@
44

55
- サーバーに Docker と Portainer がインストールされていること
66
- Tailscale の Auth Key (`tskey-auth-...`) を取得済みであること([Tailscale Admin Console](https://login.tailscale.com/admin/settings/keys)
7-
- GitHub Container Registry のパッケージ公開設定
8-
- GitHub Actions が初回実行された後、GitHub のパッケージ設定(Packages -> Package Settings)で、`Visibility``Public` に変更してください。
7+
- GitHub Container Registry (GHCR) の認証情報(個人アクセストークン等)
8+
- GitHub Organization の設定により、パッケージの Visibility が `Private` に制限されています。
9+
- デプロイ環境でイメージをプルするために、適切な権限を持つ GitHub Personal Access Token (PAT) を用意し、`docker login ghcr.io` で認証を行ってください。
10+
11+
## 認証情報の準備
12+
13+
1. GitHub の [Personal Access Tokens](https://github.com/settings/tokens) (Classic) で `read:packages` 権限を持つトークンを作成
14+
2. サーバー上で以下のコマンドを実行して GHCR にログイン
15+
```bash
16+
echo "YOUR_PAT" | docker login ghcr.io -u YOUR_GITHUB_USERNAME --password-stdin
17+
```
918

1019
## デプロイ手順
1120

@@ -39,6 +48,10 @@
3948
# Tailscale
4049
TS_AUTHKEY=tskey-auth-xxxxx
4150
TS_HOSTNAME=kc3hack-team14
51+
52+
# GitHub Container Registry (Watchtower auth)
53+
GH_USERNAME=your-github-username
54+
GH_PAT=ghp_your_personal_access_token
4255
```
4356

4457
6. Deploy the stack をクリック

0 commit comments

Comments
 (0)