Skip to content

Commit 1afd132

Browse files
committed
chore: add status page and docs into production
1 parent 1c24935 commit 1afd132

1 file changed

Lines changed: 82 additions & 1 deletion

File tree

docker-compose.production.yml

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,14 @@ services:
7474
PORT: 3000
7575
RAILS_MASTER_KEY: '${RAILS_MASTER_KEY}'
7676
RIOT_API_KEY: '${RIOT_API_KEY}'
77-
CORS_ORIGINS: '${CORS_ORIGINS:-https://prostaff.gg,https://www.prostaff.gg,https://api.prostaff.gg}'
77+
CORS_ORIGINS: '${CORS_ORIGINS:-https://prostaff.gg,https://www.prostaff.gg,https://api.prostaff.gg,https://status.prostaff.gg,https://docs.prostaff.gg}'
7878
JWT_SECRET_KEY: '${JWT_SECRET_KEY}'
7979
SECRET_KEY_BASE: '${SECRET_KEY_BASE}'
8080
# HashID Configuration
8181
HASHID_SALT: '${HASHID_SALT}'
8282
HASHID_MIN_LENGTH: '${HASHID_MIN_LENGTH}'
8383
FRONTEND_URL: '${FRONTEND_URL}'
84+
APP_HOST: '${APP_HOST:-api.prostaff.gg}'
8485

8586
healthcheck:
8687
test:
@@ -125,6 +126,86 @@ services:
125126
- coolify.applicationId=1
126127
- coolify.type=application
127128

129+
# ── status.prostaff.gg ────────────────────────────────────────────────────
130+
status:
131+
build:
132+
context: ./status-page
133+
dockerfile: Dockerfile
134+
restart: unless-stopped
135+
networks:
136+
- coolify
137+
expose:
138+
- "80"
139+
labels:
140+
- coolify.managed=true
141+
- coolify.applicationId=1
142+
- coolify.type=application
143+
144+
# Traefik — HTTPS router
145+
- traefik.enable=true
146+
- traefik.http.routers.prostaff-status.rule=Host(`status.prostaff.gg`)
147+
- traefik.http.routers.prostaff-status.entrypoints=https
148+
- traefik.http.routers.prostaff-status.tls=true
149+
- traefik.http.routers.prostaff-status.tls.certresolver=letsencrypt
150+
151+
# Service
152+
- traefik.http.services.prostaff-status.loadbalancer.server.port=80
153+
- traefik.http.services.prostaff-status.loadbalancer.server.scheme=http
154+
155+
# HTTP → HTTPS redirect
156+
- traefik.http.routers.prostaff-status-http.rule=Host(`status.prostaff.gg`)
157+
- traefik.http.routers.prostaff-status-http.entrypoints=http
158+
- traefik.http.routers.prostaff-status-http.middlewares=redirect-to-https
159+
160+
# Network
161+
- traefik.docker.network=coolify
162+
healthcheck:
163+
test: ["CMD", "wget", "-qO-", "http://localhost/health"]
164+
interval: 30s
165+
timeout: 5s
166+
retries: 3
167+
start_period: 10s
168+
169+
# ── docs.prostaff.gg ──────────────────────────────────────────────────────
170+
docs:
171+
build:
172+
context: ./docs-page
173+
dockerfile: Dockerfile
174+
restart: unless-stopped
175+
networks:
176+
- coolify
177+
expose:
178+
- "80"
179+
labels:
180+
- coolify.managed=true
181+
- coolify.applicationId=1
182+
- coolify.type=application
183+
184+
# Traefik — HTTPS router
185+
- traefik.enable=true
186+
- traefik.http.routers.prostaff-docs.rule=Host(`docs.prostaff.gg`)
187+
- traefik.http.routers.prostaff-docs.entrypoints=https
188+
- traefik.http.routers.prostaff-docs.tls=true
189+
- traefik.http.routers.prostaff-docs.tls.certresolver=letsencrypt
190+
191+
# Service
192+
- traefik.http.services.prostaff-docs.loadbalancer.server.port=80
193+
- traefik.http.services.prostaff-docs.loadbalancer.server.scheme=http
194+
195+
# HTTP → HTTPS redirect
196+
- traefik.http.routers.prostaff-docs-http.rule=Host(`docs.prostaff.gg`)
197+
- traefik.http.routers.prostaff-docs-http.entrypoints=http
198+
- traefik.http.routers.prostaff-docs-http.middlewares=redirect-to-https
199+
200+
# Network
201+
- traefik.docker.network=coolify
202+
healthcheck:
203+
test: ["CMD", "wget", "-qO-", "http://localhost/health"]
204+
interval: 30s
205+
timeout: 5s
206+
retries: 3
207+
start_period: 10s
208+
128209
volumes:
129210
redis-data:
130211
driver: local

0 commit comments

Comments
 (0)