-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (49 loc) · 1.53 KB
/
docker-compose.yml
File metadata and controls
51 lines (49 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
services:
star-watcher:
build:
context: .
dockerfile: Dockerfile
platforms:
- linux/amd64
- linux/arm64
- linux/arm/v7
image: gh-stars-watcher:local
labels:
- "org.opencontainers.image.title=GitHub Stars Watcher"
- "org.opencontainers.image.description=Monitor GitHub user's starred repositories for changes"
- "org.opencontainers.image.vendor=akme"
- "maintainer=akme"
environment:
# Optional: Set GitHub token via environment
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
volumes:
# Mount state directory for persistence
- star-watcher-data:/home/nonroot/.star-watcher:rw
user: "65532:65532" # nonroot user
# Example command - monitor a user
command: ["monitor", "octocat", "--output", "json"]
# Development service with volume mount for live development
star-watcher-dev:
build:
context: .
dockerfile: Dockerfile
target: builder
image: gh-stars-watcher:dev
labels:
- "org.opencontainers.image.title=GitHub Stars Watcher (Development)"
- "org.opencontainers.image.description=Development build with Go toolchain"
- "org.opencontainers.image.vendor=akme"
- "maintainer=akme"
working_dir: /app
volumes:
- .:/app:ro
- star-watcher-cache:/go/pkg/mod:rw
environment:
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
- CGO_ENABLED=0
command: ["go", "run", "./cmd/star-watcher", "--help"]
volumes:
star-watcher-data:
driver: local
star-watcher-cache:
driver: local