-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (73 loc) · 2.21 KB
/
Copy pathdocker-compose.yml
File metadata and controls
85 lines (73 loc) · 2.21 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: golf-postgres
restart: unless-stopped
environment:
POSTGRES_DB: golf
POSTGRES_USER: golfer
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./ddl/createTables.sql:/docker-entrypoint-initdb.d/createTables.sql:ro
networks:
- golf-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U golfer -d golf"]
interval: 10s
timeout: 5s
retries: 5
# Golf Card Game Application
golf-app:
image: ghcr.io/codingarctic/golf-card-game:latest
container_name: golf-app
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
# Environment (production/development)
ENV: production
# Database connection
CONNECTION_STRING: postgres://golfer:${POSTGRES_PASSWORD_ENCODED}@postgres:5432/golf?sslmode=disable
# Server configuration
SERVER_PORT: :8080
FRONTEND_URL: ${APP_URL}
# Application URL (for emails, etc.)
APP_URL: ${APP_URL}
# Cloudflare Turnstile (CAPTCHA)
TURNSTILE_SECRET_KEY: ${TURNSTILE_SECRET_KEY}
# Resend Email Service
RESEND_API_KEY: ${RESEND_API_KEY}
RESEND_FROM_EMAIL: ${RESEND_FROM_EMAIL}
ports:
- "${HOST_PORT:-8080}:8080"
networks:
- golf-network
labels:
- "com.centurylinklabs.watchtower.enable=true"
# Watchtower - Automatic container updates
watchtower:
image: containrrr/watchtower:latest
container_name: golf-watchtower
restart: unless-stopped
environment:
# Check for updates every 5 minutes (300 seconds)
WATCHTOWER_POLL_INTERVAL: 300
# Only update containers with the watchtower label
WATCHTOWER_LABEL_ENABLE: "true"
# Clean up old images after updating
WATCHTOWER_CLEANUP: "true"
# Include stopped containers
WATCHTOWER_INCLUDE_STOPPED: "true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- golf-network
networks:
golf-network:
driver: bridge
volumes:
postgres_data:
driver: local