generated from sunithvs/django-docker-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
82 lines (75 loc) · 1.47 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
version: '3.8'
services:
web:
command: ["bash", "scripts/run.sh"]
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/code
env_file:
- .env
depends_on:
db:
condition: service_healthy
networks:
- nginx_network
db:
image: postgres:latest
env_file:
- .env
volumes:
- ps_data:/var/lib/postgresql/data
- ./db_init:/docker-entrypoint-initdb.d
networks:
- nginx_network
healthcheck:
test: [ "CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'" ]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:latest
networks:
- nginx_network
# pgadmin:
# image: dpage/pgadmin4
# env_file:
# - .env
# volumes:
# - pgadmin_data:/var/lib/pgadmin
# networks:
# - nginx_network
nginx:
image: nginx:latest
ports:
- "8000:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./staticfiles:/code/staticfiles
- ./media:/code/media
depends_on:
- web
networks:
- nginx_network
#
# metabase:
# image: metabase/metabase
# volumes:
# - metabase_data:/metabase-data
# env_file:
# - .env
# ports:
# - "3002:3000"
# networks:
# - nginx_network
# depends_on:
# db:
# condition: service_healthy
# restart: unless-stopped
volumes:
ps_data:
pgadmin_data:
metabase_data:
networks:
nginx_network: