-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
86 lines (78 loc) · 1.59 KB
/
docker-compose.yml
File metadata and controls
86 lines (78 loc) · 1.59 KB
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
83
84
85
86
version: "3.8"
services:
db:
build:
context: ./docker/postgres/
dockerfile: dockerfile
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- ./docker/postgres/.env
container_name: postgres
restart: unless-stopped
redis:
image: redis:7.0.11-alpine
container_name: redis
web:
build:
context: .
image: ecomstore_web
entrypoint: /home/app/web/docker/entrypoints/web.sh
volumes:
- static_volume:/home/app/web/staticfiles
- ./:/home/app/web
expose:
- 8000
restart: unless-stopped
container_name: ecomstore
env_file:
- ./.env
depends_on:
- db
- redis
healthcheck:
test: curl --fail http://localhost:8000 || exit 1
interval: 10s
timeout: 10s
start_period: 10s
retries: 3
celery_worker:
restart: always
build:
context: .
image: ecomstore_celery_worker
entrypoint: /home/app/web/docker/entrypoints/celery.sh
container_name: celery
env_file:
- ./.env
depends_on:
- redis
- db
- web
flower:
build:
context: .
image: ecomstore_flower
entrypoint: /home/app/web/docker/entrypoints/flower.sh
env_file:
- ./.env
ports:
- 5557:5555
depends_on:
- redis
- db
nginx:
build:
context: ./docker/nginx/
dockerfile: dockerfile
container_name: nginx
volumes:
- static_volume:/home/app/web/staticfiles
ports:
- 8000:80
depends_on:
- web
restart: always
volumes:
postgres_data:
static_volume: