-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
70 lines (66 loc) · 1.77 KB
/
docker-compose.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
version: '2.20.2'
services:
db:
image: "postgres:15.4-alpine3.18"
restart: always
expose:
- "5432"
environment:
- "POSTGRES_DB=${POSTGRES_DB:?variable POSTGRES_DB is missing}"
- "POSTGRES_USER=${POSTGRES_USER:?variable POSTGRES_USER is missing}"
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?variable POSTGRES_PASSWORD is missing}"
container_name: postgresdb
networks:
- 42_network
volumes:
- dbdata:/var/lib/postgresql/data
backend:
restart: always
build:
context: backend
dockerfile: Dockerfile
command: |
npm run start:prod
container_name: backend
expose:
- "3000"
environment:
- "POSTGRES_DB=${POSTGRES_DB:?variable POSTGRES_DB is missing}"
- "POSTGRES_USER=${POSTGRES_USER:?variable POSTGRES_USER is missing}"
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?variable POSTGRES_PASSWORD is missing}"
- "TCD_UID=${TCD_UID:?variable TCD_UID is missing}"
- "TCD_SECRET=${TCD_SECRET:?variable TCD_SECRET is missing}"
- "HOST_NAME=${HOST_NAME:?variable HOST_NAME is missing}"
- "JWT_SECRET=${JWT_SECRET:?variable JWT_SECRET is missing}"
depends_on:
- db
volumes:
- pictures:/app/uploadedData
networks:
- 42_network
frontend:
restart: always
build:
context: client
dockerfile: Dockerfile
args:
HOST_NAME: "${HOST_NAME:?variable HOST_NAME is missing}"
command: "nginx -g 'daemon off;'"
container_name: frontend
ports:
- "4200:4200"
- "3000:3000"
depends_on:
- backend
networks:
- 42_network
volumes:
dbdata:
pictures:
driver: local
driver_opts:
o: bind
type: none
device: "./backend/uploadedData"
networks:
42_network: