-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
61 lines (60 loc) · 1.24 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
services:
node:
networks:
- back-tier
depends_on:
- db
build:
context: ./server
dockerfile: ./Dockerfile
volumes:
- ./server:/home/node/app
- /home/node/app/node_modules
ports:
- ${SERVER_LOCAL_PORT}:${SERVER_PORT}
develop:
watch:
- action: sync
path: ./src
target: /home/node/app/src
- action: rebuild
path: ./package.json
target: /home/node/app/package.json
env_file: .env
environment:
- DB_HOST=db
db:
image: postgres
restart: always
networks:
- back-tier
user: postgres
ports:
- ${DB_LOCAL_PORT}:${DB_PORT}
volumes:
- db:/var/lib/postgres
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
healthcheck:
test: ["CMD", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
dbViewer:
image: dpage/pgadmin4:latest
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_EMAIL}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_PASSWORD}
ports:
- "16543:80"
depends_on:
- db
networks:
- back-tier
networks:
back-tier:
driver: bridge
volumes:
db: