-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
46 lines (43 loc) · 926 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
43
44
45
46
version: '3.9'
services:
app:
container_name: zort-backend
env_file:
- .env
environment:
API_PORT: ${API_PORT}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_NAME: ${DB_NAME}
DB_PORT: ${DB_PORT}
DB_HOST: ${DB_HOST}
tty: true
build: .
ports:
- ${API_PORT}:${API_PORT}
restart: on-failure
volumes:
- .:/app
depends_on:
- postgresdb
networks:
- learning
postgresdb:
image: postgres:latest
container_name: postgres_container
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
ports:
- ${DB_PORT}:${DB_PORT}
volumes:
- ./pg_data:/var/lib/postgresql/data
networks:
- learning
volumes:
pg_data:
# Networks to be created to facilitate communication between containers
networks:
learning:
driver: bridge