-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
74 lines (71 loc) · 1.53 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
63
64
65
66
67
68
69
70
71
72
73
74
version: "3"
services:
database:
image: postgres:14.5-bullseye
restart: unless-stopped
environment:
- POSTGRES_USER=$SQL_USER
- POSTGRES_PASSWORD=$SQL_PSWD
networks:
- main
logging:
options:
max-size: 10m
max-file: "3"
ports:
- $SQL_PORT:5432
volumes:
- ./database/data:/var/lib/postgresql/data
- ./database/create_db.sql:/docker-entrypoint-initdb.d/create_db.sql
backend:
build:
context: ./backend
dockerfile: Dockerfile
networks:
- main
logging:
options:
max-size: 10m
max-file: "3"
restart: unless-stopped
environment:
- HOST=$BACKEND_HOST
- PORT=$BACKEND_PORT
- DEBUG=$BACKEND_DEBUG
- SQL_USER=$SQL_USER
- SQL_PSWD=$SQL_PSWD
- SQL_HOST=$SQL_HOST
- SQL_PORT=$SQL_PORT
- SQL_DATABASE=$SQL_DATABASE
ports:
- $BACKEND_PORT:$BACKEND_PORT
volumes:
- "./backend:/usr/app"
command: python3 -u ./src/run.py
depends_on:
- database
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
networks:
- main
logging:
options:
max-size: 10m
max-file: "3"
restart: unless-stopped
environment:
- HOST=$FRONTEND_HOST
- PORT=$FRONTEND_PORT
- BASE_URL=$BASE_URL
ports:
- $FRONTEND_PORT:$FRONTEND_PORT
volumes:
- "/usr/app/node_modules"
- "./frontend:/usr/app"
depends_on:
- backend
command: npm run docker
networks:
main: