You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/DOCKER.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ Docker support is designed for **mentor-friendly deployment** and **reproducible
43
43
```bash
44
44
docker compose run --rm bot --config /app/config/config.yaml run-once
45
45
```
46
-
(Do not pass `ghdcbot` — the image entrypoint is already`ghdcbot`.)
46
+
(Do not pass `ghdcbot` — the image default command is`ghdcbot`.)
47
47
48
48
---
49
49
@@ -79,16 +79,16 @@ Gitcord-GithubDiscordBot/
79
79
|`PYTHONDONTWRITEBYTECODE=1`| Avoids writing `.pyc` in the image; cleaner and slightly faster. |
80
80
|`PYTHONUNBUFFERED=1`| Logs show up immediately in `docker compose logs`. |
81
81
| Copy `pyproject.toml` + `src/` then `pip install -e .`| Dependency layer is cached; only code/setup changes trigger reinstall. |
82
-
|`useradd appuser` / `USER appuser`| Process does not run as root. |
83
-
|`ENTRYPOINT ["ghdcbot"]`| All invocations use the same binary; override with `run-once`, `bot`, etc. |
84
-
|`CMD ["--config", "/app/config/config.yaml", "bot"]`| Default is Discord bot; overridden by `docker-compose``command` or `docker run ... run-once`. |
82
+
|`useradd appuser` / `USER appuser`| Process runs as non-root; no gosu/entrypoint at runtime. |
83
+
|`CMD ["ghdcbot", "--config", "/app/config/config.yaml", "bot"]`| Default is Discord bot; override with `docker compose run ... run-once` etc. |
85
84
86
85
---
87
86
88
87
## docker-compose.yml Design
89
88
90
89
| Section | Purpose |
91
90
|--------|--------|
91
+
|`init_data` service | Runs once as root to `chown` the volume to `appuser` so the bot (non-root) can write; then exits. Bot starts after it completes. |
92
92
|`env_file: .env`| Loads `GITHUB_TOKEN` and `DISCORD_TOKEN`; config YAML uses `${GITHUB_TOKEN}` etc. |
93
93
|`./config:/app/config:ro`| Host config dir mounted read-only; edit YAML on host without rebuilding. |
94
94
|`gitcord_data:/data`| Named volume for SQLite and reports; survives `docker compose down`. |
0 commit comments