-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.dev.yaml
97 lines (91 loc) · 2.18 KB
/
docker-compose.dev.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
version: '3.3'
services:
################ Postgresql ################
postgres:
container_name: postgres
restart: unless-stopped
image: postgres:14
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_INITDB_ARGS: --encoding=UTF-8
PG_DATA: /var/lib/postgresql/data
ports:
- ${DB_PORT}:${DB_PORT}
volumes:
- pgdata:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
networks:
- webnet
################## Backend #################
back:
container_name: back
restart: unless-stopped
depends_on:
- postgres
ports:
- ${BACK_PORT}:${BACK_PORT}
build:
context: .
dockerfile: ./docker/back.Dockerfile
args:
NODE_ENV: developpement
command: yarn start:dev
volumes:
- './backend/:/usr/src/app'
- './common/:/usr/src/app/src/common/'
env_file:
- .env
environment:
FRONTEND_HOST: http://127.0.0.1:${VITE_PORT}
API_HOST: http://127.0.0.1:${BACK_PORT}/api
networks:
- webnet
################## Frontend #################
front:
container_name: front
restart: unless-stopped
ports:
- ${VITE_PORT}:${VITE_PORT}
build:
context: .
dockerfile: ./docker/front.Dockerfile
args:
NODE_ENV: developpement
command: yarn dev
volumes:
- './frontend/:/usr/src/app'
- './common/:/usr/src/app/src/common/'
env_file:
- .env
environment:
FRONTEND_HOST: http://127.0.0.1:${VITE_PORT}
API_HOST: http://127.0.0.1:${BACK_PORT}/api
VITE_API_HOST: http://127.0.0.1:${BACK_PORT}/api
networks:
- webnet
################## PGadmin ##################
pgadmin:
container_name: pgadmin
restart: unless-stopped
depends_on:
- postgres
ports:
- 5000:80
build:
context: .
dockerfile: ./docker/pgadmin.Dockerfile
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: root
networks:
- webnet
networks:
webnet:
driver: bridge
volumes:
pgdata:
driver: local