-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
161 lines (144 loc) · 5.34 KB
/
Copy pathdocker-compose.yml
File metadata and controls
161 lines (144 loc) · 5.34 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
services:
db:
image: postgres:15-alpine
environment:
- POSTGRES_USER=${PG_USER}
- POSTGRES_PASSWORD=${PG_PASSWORD}
- POSTGRES_DB=${PG_DB}
volumes:
- postgres_data:/var/lib/postgresql/data/
frontend:
#image: ghcr.io/gamedirection/open-trivia-frontend:v0.3.19
build: ./frontend
ports:
- "3045:3000"
depends_on:
- backend
environment:
- REACT_APP_API_URL=/api
# Set REACT_APP_SOCKET_URL to the backend's public URL when a reverse proxy
# sits in front and drops WebSocket upgrades (nginx/Traefik/Caddy setups).
# Example: - REACT_APP_SOCKET_URL=https://trivia.yourdomain.com:3029
- REACT_APP_SOCKET_URL=${REACT_APP_SOCKET_URL:-}
- REACT_APP_VERSION=${FRONTEND_IMAGE_TAG:-latest}
- APP_IMAGE_TAG=${FRONTEND_IMAGE_TAG:-latest}
- PUBLIC_APP_URL=${PUBLIC_APP_URL}
- APP_URL=${APP_URL}
- LEGAL_OPERATOR_NAME=${LEGAL_OPERATOR_NAME}
- LEGAL_CONTACT_EMAIL=${LEGAL_CONTACT_EMAIL}
- LEGAL_LAST_UPDATED=${LEGAL_LAST_UPDATED}
# - REACT_APP_BRAND_LOGO_URL=/brand/logo.png
# - REACT_APP_API_URL=http://localhost:5000/api
# - REACT_APP_API_URL=http://backend:5000/api
# Optional: mount a branded logo (shown in header/reset screens)
# volumes:
# - ./branding/logo.png:/app/public/brand/logo.png:ro
backend:
#image: ghcr.io/gamedirection/open-trivia-backend:v0.3.19
build: ./backend
ports:
- "3001:5000"
#secrets: # DockerSwarm
# - smtp_host
# - smtp_user
# - smtp_pass
environment:
- PG_HOST=${PG_HOST}
- PG_PORT=${PG_PORT}
- PG_USER=${PG_USER}
- PG_PASSWORD=${PG_PASSWORD}
- PG_DB=${PG_DB}
- JWT_SECRET=${JWT_SECRET}
# ── Email / SMTP ──────────────────────────────────────────────────────────
# The public URL of your frontend (used to build the reset link in emails).
# Change this to your domain in production, e.g. https://trivia.example.com
- APP_URL=${APP_URL}
# Leave SMTP_HOST blank (or remove these lines entirely) to disable outbound
# email. The backend will fall back to logging reset tokens to stdout, and
# the frontend will show the token directly so the app still works.
- SMTP_HOST=${SMTP_HOST}
- SMTP_PORT=587
# Set SMTP_SECURE=true only for port 465 (implicit TLS). Leave false for
# port 587 (STARTTLS) or port 25.
- SMTP_SECURE=false
- SMTP_USER=${SMTP_USER}
- SMTP_PASS=${SMTP_PASS}
# Displayed in the From: header. Defaults to noreply@<SMTP_HOST> if blank.
- SMTP_FROM=${SMTP_USER} # noreply<@SMTP_HOST>
- DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID}
- DISCORD_CLIENT_SECRET=${DISCORD_CLIENT_SECRET}
- DISCORD_REDIRECT_URI=${DISCORD_REDIRECT_URI}
- DISCORD_BOT_API_TOKEN=${DISCORD_BOT_API_TOKEN}
- PUBLIC_APP_URL=${PUBLIC_APP_URL}
- DISCORD_BOT_SERVICE_URL=${DISCORD_BOT_SERVICE_URL}
- DISCORD_BOT_INVITE_URL=${DISCORD_BOT_INVITE_URL}
# ── Common provider examples (uncomment and fill in one block) ────────────
# Gmail (use an App Password, not your account password):
# - SMTP_HOST=smtp.gmail.com
# - SMTP_PORT=587
# - SMTP_SECURE=false
# - SMTP_USER=you@gmail.com
# - SMTP_PASS=your-app-password
# Outlook / Office 365:
# - SMTP_HOST=smtp.office365.com
# - SMTP_PORT=587
# - SMTP_SECURE=false
# - SMTP_USER=you@outlook.com
# - SMTP_PASS=your-password
# Mailgun (SMTP relay):
# - SMTP_HOST=smtp.mailgun.org
# - SMTP_PORT=587
# - SMTP_SECURE=false
# - SMTP_USER=postmaster@mg.yourdomain.com
# - SMTP_PASS=your-mailgun-smtp-password
# SendGrid:
# - SMTP_HOST=smtp.sendgrid.net
# - SMTP_PORT=587
# - SMTP_SECURE=false
# - SMTP_USER=apikey
# - SMTP_PASS=your-sendgrid-api-key
# Brevo (formerly Sendinblue):
# - SMTP_HOST=smtp-relay.brevo.com
# - SMTP_PORT=587
# - SMTP_SECURE=false
# - SMTP_USER=your-brevo-login
# - SMTP_PASS=your-brevo-smtp-key
# Self-hosted (e.g. Postfix, Mailcow) - no auth:
# - SMTP_HOST=mail.yourdomain.com
# - SMTP_PORT=25
# - SMTP_SECURE=false
# - SMTP_USER=
# - SMTP_PASS=
depends_on:
- db
discord-bot:
build: ./services/open-trivia-discord
depends_on:
- backend
environment:
- DISCORD_TOKEN=${BOT_DISCORD_TOKEN}
- DISCORD_CLIENT_ID=${BOT_DISCORD_CLIENT_ID}
- BOT_API_BASE_URL=http://backend:5000
- BOT_API_TOKEN=${DISCORD_BOT_API_TOKEN}
- BOT_PUBLIC_APP_URL=${PUBLIC_APP_URL:-http://localhost:3000}
- BOT_STORAGE_PATH=/tmp/open-trivia-discord-state.json
- BOT_SCHEDULE_POLL_MS=${BOT_SCHEDULE_POLL_MS:-15000}
- BOT_QUESTION_TIMEOUT_SECONDS=${BOT_QUESTION_TIMEOUT_SECONDS:-86400}
#swaggerui:
# image: swaggerapi/swagger-ui:latest
# ports:
# - "3002:8080"
# environment:
# - SWAGGER_JSON=/spec/openapi.json
# volumes:
# - ./docs/openapi.json:/spec/openapi.json:ro
volumes:
postgres_data:
# DockerSwarm
#secrets:
# smtp_host:
# file: ./secrets/smtp_host.txt
# smtp_user:
# file: ./secrets/smtp_user.txt
# smtp_pass:
# file: ./secrets/smtp_pass.txt