-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
52 lines (51 loc) · 1.33 KB
/
docker-compose.prod.yml
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
---
version: '3'
services:
api:
build: ./backend/api
restart: always
ports:
- ${API_PORT-8000}:8000
volumes:
- ./backend/api:/app
working_dir: /app
environment:
- DB_URL=postgresql+psycopg2://${DB_USER-user}:${DB_PASSWORD-password}@db:${DB_PORT-5432}/${DB_NAME-db}
- FLASK_ENV=production
- FLASK_SECRET_KEY=${API_SECRET_KEY}
depends_on:
- db
links:
- db
websocket:
build: ./backend/websocket
restart: always
ports:
- ${WS_PORT-8001}:8001
adminer:
image: adminer
restart: always
ports:
- ${ADMINER_PORT-8080}:${ADMINER_PORT-8080}
depends_on:
- db
db:
image: postgres:12.4
restart: always
environment:
- POSTGRES_DB=${DB_NAME-db}
- POSTGRES_USER=${DB_USER-user}
- POSTGRES_PASSWORD=${DB_PASSWORD-password}
volumes:
- ./postgresql:/var/lib/postgresql
ports:
- ${DB_PORT-5432}:5432
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.production
ports:
- ${FRONTEND_PORT-80}:3000
depends_on:
- api
- websocket