-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
42 lines (38 loc) · 962 Bytes
/
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
version: '2'
networks:
app-tier:
driver: bridge
services:
backend:
build:
context: .
dockerfile: Dockerfile
container_name: booking_be_container
command: yarn start:dev
env_file:
- .env.stage.dev
ports:
- '4000:4000'
depends_on:
- postgresql-master
restart: always
networks:
- app-tier
postgresql-master:
image: docker.io/bitnami/postgresql:14
container_name: booking_db_container
volumes:
- 'postgresql_master_data:/bitnami/postgresql'
environment:
- POSTGRESQL_USERNAME=phatdo
- POSTGRESQL_PASSWORD=Blue_Berry
- POSTGRESQL_DATABASE=bookingdb
ports:
- '5432:5432'
restart: always
networks:
- app-tier
volumes:
postgresql_master_data:
driver: local
# To connect postgresql-master you need to get ip address them. Using docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <container-ID>