-
Notifications
You must be signed in to change notification settings - Fork 0
/
production.yaml
76 lines (69 loc) · 1.42 KB
/
production.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
75
76
version: "3.9"
services:
web:
image: nginx:latest
restart: always
volumes:
- ./element-quiz.conf.template:/etc/nginx/templates/element-quiz.conf.template
- ./nginx.conf:/etc/nginx/nginx.conf
- /etc/letsencrypt/:/etc/letsencrypt/
environment:
- PUBLIC_API_URL=$PUBLIC_API_URL
- PUBLIC_FRONT_URL=$PUBLIC_FRONT_URL
- PUBLIC_URL=$PUBLIC_URL
ports:
- 80:80
- 443:443
depends_on:
- db
- front
- api
networks:
- frontend-network
- api-network
db:
image: postgres:14
expose:
- 5432:5432
restart: always
volumes:
- db-store:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- POSTGRES_DB=$POSTGRES_DB
- POSTGRES_USER=$POSTGRES_USER
networks:
- api-network
front:
build:
context: ./front
dockerfile: DockerfileProduction
restart: always
volumes:
- ./front/src:/front/src
expose:
- "3000:3000"
working_dir: /front
command: serve -s build
networks:
- frontend-network
api:
environment:
- NODE_ENV=production
depends_on:
- db
build: api
restart: always
volumes:
- ./api/src:/api/src
expose:
- "4000:4000"
working_dir: /api
command: npm start
networks:
- api-network
volumes:
db-store:
networks:
frontend-network:
api-network: