-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
62 lines (55 loc) · 1.58 KB
/
docker-compose.yaml
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
version: '3.4'
services:
therunninggame-frontend:
build:
context: .
dockerfile: ./frontend/Dockerfile
depends_on:
- therunninggame-backend
command: npm run preview
restart: unless-stopped
networks:
- therunninggame
- service-routing
environment:
VITE_BACKEND_SERVICE_URL: ${VITE_BACKEND_SERVICE_URL}
VITE_SESSION_COOKIE_NAME: ${VITE_SESSION_COOKIE_NAME}
therunninggame-backend:
build:
context: ./backend
dockerfile: Dockerfile
depends_on:
- database
command: uvicorn service:app --host 0.0.0.0 --root-path /api --port 8080
restart: unless-stopped
networks:
- therunninggame
- service-routing
environment:
BACKEND_DATABASE_CONNECTION_STRING: ${BACKEND_DATABASE_CONNECTION_STRING}
BACKEND_SERVICE_URL: ${BACKEND_SERVICE_URL}
FRONTEND_URL: ${FRONTEND_URL}
STRAVA_CLIENT_ID: ${STRAVA_CLIENT_ID}
STRAVA_CLIENT_SECRET: ${STRAVA_CLIENT_SECRET}
VITE_BACKEND_SERVICE_URL: ${VITE_BACKEND_SERVICE_URL}
VITE_SESSION_COOKIE_NAME: ${VITE_SESSION_COOKIE_NAME}
database:
image: postgres:16-bullseye
restart: unless-stopped
volumes:
- ./data/postgres:/data/postgres
ports:
- "54321:5432"
networks:
- therunninggame
environment:
POSTGRES_USER: ${BACKEND_DATABASE_USER}
POSTGRES_PASSWORD: ${BACKEND_DATABASE_PASSWORD}
POSTGRES_DB: ${BACKEND_DATABASE_DATABASE}
PGDATA: /data/postgres
networks:
therunninggame:
name: therunninggame
service-routing:
external: true
name: service-routing