-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (74 loc) · 1.69 KB
/
docker-compose.yml
File metadata and controls
81 lines (74 loc) · 1.69 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
version: '2.1'
services:
db:
# restart: always
image: postgres:latest
container_name: pq01
healthcheck:
test: "pg_isready -h localhost -p 5432 -q -U postgres"
interval: 3s
timeout: 5s
retries: 5
expose:
- "5432"
web:
# restart: always
build:
context: .
dockerfile: ./compose/django/Dockerfile
expose:
- "8000"
container_name: dg01
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
links:
- redis
- db
volumes:
- ./:/webapps/code
- ./cactusproj/static:/webapps/www/static
- ./cactusproj/media:/webapps/www/media
command: bash -c 'python manage.py makemigrations && python manage.py migrate && gunicorn cactusproj.wsgi -b :8000'
nginx:
# restart: always
image: nginx:latest
container_name: nx01
ports:
- "80:80"
depends_on:
web:
condition: service_started
volumes_from:
- web
volumes:
- ./compose/nginx:/etc/nginx/conf.d
links:
- web
redis:
# restart: always
image: redis:latest
container_name: rd01
healthcheck:
test: "redis-cli ping"
interval: 3s
timeout: 5s
retries: 5
expose:
- '6379'
celery:
# restart: always
build:
context: .
dockerfile: ./compose/django/Dockerfile
container_name: cl01
# volumes: # only for my development delete it
# - ~/.ssh:/root/.ssh # only for my development delete it
links:
- db
- redis
volumes_from:
- web
command: celery --purge -n celery_worker --app=cactusproj.celery:app worker --loglevel=INFO