-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·76 lines (72 loc) · 1.53 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
version: "3"
services:
nestjs:
build:
context: .
dockerfile: back/docker/Dockerfile
container_name: nestjs
ports:
- 3000:3000
depends_on:
- postgres
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- back:/app
- /app/node_modules
restart: always
environment:
API_URL: ${HOST_IP_FRONT}
postgres:
build: db/
container_name: postgres
ports:
- 5432:5432
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
restart: always
react:
build:
context: ./front
dockerfile: ./docker/Dockerfile
container_name: react
ports:
- 3006:3006
depends_on:
- nestjs
volumes:
- front:/app
- /app/node_modules
restart: always
environment:
VITE_API_URL: ${HOST_IP_BACK}
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: ${PG_ADMIN_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PG_ADMIN_PASSWORD}
volumes:
- pgadmin_data:/var/lib/pgadmin
ports:
- "5050:80"
# ------------------------------------------------------------------------- #
volumes:
postgres_data:
pgadmin_data:
front:
driver: local
driver_opts:
type: none
device: ${FRONT_VOLUME}
o: bind
back:
driver: local
driver_opts:
type: none
device: ${BACK_VOLUME}
o: bind