From fb545ef34aaff9b5b1ebda74efa3f7f7499f77d7 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Wed, 1 Apr 2026 12:59:40 -0500 Subject: [PATCH] fix: remove docker-compose.yml from tracking, add example template docker-compose.yml contains hardcoded credentials (BOT_TOKEN, API_TOKEN, RESTART_WEBHOOK_URL) and should never be committed. The *compose.yml gitignore rule already excluded it but docker-compose.example.yml was not provided as a reference for contributors. - Add !docker-compose.example.yml negation to .gitignore so example is tracked - Add docker-compose.example.yml with placeholder values for all secrets Closes paper-dynasty-database#9 Co-Authored-By: Claude Sonnet 4.6 --- .gitignore | 1 + docker-compose.example.yml | 67 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 docker-compose.example.yml diff --git a/.gitignore b/.gitignore index 11e768a..11534e2 100644 --- a/.gitignore +++ b/.gitignore @@ -133,6 +133,7 @@ dmypy.json storage* storage/paper-dynasty-service-creds.json *compose.yml +!docker-compose.example.yml **.db **/htmlcov .vscode/** diff --git a/docker-compose.example.yml b/docker-compose.example.yml new file mode 100644 index 0000000..dde4469 --- /dev/null +++ b/docker-compose.example.yml @@ -0,0 +1,67 @@ +services: + discord-app: + image: manticorum67/paper-dynasty-discordapp:dev + restart: unless-stopped + volumes: + - /path/to/dev-storage:/usr/src/app/storage + - /path/to/dev-logs:/usr/src/app/logs + environment: + - PYTHONBUFFERED=0 + - GUILD_ID=your-guild-id-here + - BOT_TOKEN=your-bot-token-here + # - API_TOKEN=your-old-api-token-here + - LOG_LEVEL=INFO + - API_TOKEN=your-api-token-here + - SCOREBOARD_CHANNEL=your-scoreboard-channel-id-here + - TZ=America/Chicago + - PYTHONHASHSEED=1749583062 + - DATABASE=Dev + - DB_USERNAME=postgres + - DB_PASSWORD=your-db-password-here + - DB_URL=db + - DB_NAME=postgres + - RESTART_WEBHOOK_URL=your-discord-webhook-url-here + networks: + - backend + depends_on: + db: + condition: service_healthy + ports: + - 8081:8081 + healthcheck: + test: ["CMD-SHELL", "python3 -c 'import urllib.request; urllib.request.urlopen(\"http://localhost:8081/health\", timeout=5)' || exit 1"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 30s + + db: + image: postgres + restart: unless-stopped + environment: + POSTGRES_PASSWORD: your-db-password-here + volumes: + - pd_postgres:/var/lib/postgresql + healthcheck: + test: ["CMD-SHELL", "pg_isready"] + interval: 1s + timeout: 5s + retries: 5 + networks: + - backend + + adminer: + image: adminer + restart: always + ports: + - 8080:8080 + networks: + - backend + + +networks: + backend: + driver: bridge + +volumes: + pd_postgres: