-
Notifications
You must be signed in to change notification settings - Fork 112
/
docker-compose.yml
50 lines (47 loc) · 1.1 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
version: '3'
services:
postgresql:
image: postgres
restart: always
# network_mode: "host"
volumes:
- ./tmp/postgresql_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=fobi
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=test
- DJANGO_SETTINGS_MODULE=settings.docker
ports:
- "5432:5432"
healthcheck:
test: ["CMD", "pg_isready", "--timeout", "5s"]
tty: true
stdin_open: true
backend:
container_name: django_fobi_backend
image: django_fobi_backend:latest
build:
context: .
dockerfile: ./docker/backend/Dockerfile
volumes:
- .:/backend
- ./docker/backend:/docker/backend
# network_mode: "host"
ports:
- "8000:8000"
depends_on:
- postgresql
links:
- postgresql:postgresql
entrypoint:
- /backend/docker/backend/entrypoint.sh
environment:
- POSTGRES_NAME=fobi
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=test
- DJANGO_SETTINGS_MODULE=settings.docker
tty: true
stdin_open: true
volumes:
postgresql_data:
driver: local