-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
53 lines (48 loc) · 1.08 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
version: "3.9"
services:
api:
build: .
command: >
bash -c "python manage.py makemigrations &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
# volumes:
# - .:/code
ports:
- 3888:8000
depends_on:
db:
condition: service_healthy
networks:
- sivalanet_network
restart: always
container_name: sivalanet_django_server
db:
container_name: sivalanet_postgres_db
image: postgis/postgis:13-3.3 #postgres:13
healthcheck:
test: "exit 0"
interval: 1s
timeout: 1s
retries: 30
platform: linux/amd64
# restart: always
volumes:
- postgres_data:/var/lib/postgresql/data/
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- 5455:5432
environment:
POSTGRES_PASSWORD: 'postgres'
# - "POSTGRES_HOST_AUTH_METHOD=trust"
networks:
sivalanet_network:
ipv4_address: 172.27.0.2
restart: always
volumes:
postgres_data:
networks:
sivalanet_network:
ipam:
config:
- subnet: 172.27.0.0/16