-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
87 lines (79 loc) · 1.89 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
84
85
86
87
version: "3.7"
services:
# ####################### React #########################
ft_react:
depends_on:
- ft_nestjs
build:
context: ./front-end
dockerfile: ./Dockerfile
container_name: "container-front-end"
env_file:
- "./.env"
ports:
- "8080:3000"
networks:
- webnet
volumes:
- ./front-end:/usr/src/app
- /usr/src/app/node_modules
- ./shared:/usr/src/app/public/shared/
restart: always
# ####################### NestJS #########################
ft_nestjs:
depends_on:
- ft_postgres
build:
context: ./back-end
target: development
# dockerfile: ./Dockerfile
container_name: "container-nestjs"
env_file:
- ./.env
networks:
- webnet
ports:
- ${SERVER_PORT}:${SERVER_PORT}
volumes:
- ./back-end:/usr/src/app
- /usr/src/app/node_modules
- ./shared:/usr/src/app/public/shared
command: npm run start:dev
restart: always
# ####################### postgres #########################
ft_postgres:
image: postgres:alpine
container_name: "container-postgres"
env_file:
- .env
environment:
PG_DATA: /var/lib/postgresql/data
POSTGRES_DB: ${POSTGRES_DATABASE_NAME}
POSTGRES_USER: ${POSTGRES_USERNAME}
# POSTGRES_INITDB_ARGS: "--auth-host=scram-sha-256"
ports:
- 5432:5432
volumes:
- pgdata:/var/lib/postgresql/data
- ./db_backup:/opt/db_backup
networks:
- webnet
restart: always
# ####################### pgadmin #########################
pgadmin:
container_name: "container-pgadmin4"
image: dpage/pgadmin4
# logging:
# driver: none
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: root
ports:
- "5050:80"
networks:
- webnet
networks:
webnet:
volumes:
pgdata: