-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
83 lines (75 loc) · 1.63 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
71
72
73
74
75
76
77
78
79
80
81
82
83
version: '3.9'
x-typeorm: &typeorm-env
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
JWT_SECRET: ${JWT_SECRET}
volumes:
postgres_data: {}
shared-volume:
networks:
api-network: {}
authentication-network:
name: authentication-network
driver: bridge
external: false
#---------- SERVICES ----------#
services:
client_web:
restart: always
image: web-frontend
build: ./web
ports:
- ${WEB_PORT}:${WEB_PORT}
environment:
WEB_PORT: ${WEB_PORT}
networks:
- api-network
depends_on:
- client_mobile
- server
volumes:
- shared-volume:/app/public/apk
client_mobile:
image: mobile-frontend
build: ./mobile
networks:
- api-network
depends_on:
- server
volumes:
- shared-volume:/app
server:
container_name: backend
build:
context: ./backend
dockerfile: ./Dockerfile
networks:
- authentication-network
volumes:
- ./backend:/home/node/app
depends_on:
- postgres-db
env_file:
- .env
ports:
- ${API_PORT}:${API_PORT}
environment:
<<: *typeorm-env
entrypoint: [ "npm", "run", "start:dev", "--tsc" ]
postgres-db:
image: postgres:14
container_name: ${POSTGRES_HOST}
environment:
<<: *typeorm-env
ports:
- ${POSTGRES_PORT}:${POSTGRES_PORT}
restart: on-failure
stdin_open: true
tty: true
networks:
- authentication-network
volumes:
- postgres_data:/var/lib/postgresql@14/data