-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
49 lines (45 loc) · 1.03 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
version: '3'
services:
redis:
image: "redis:alpine"
nginx:
container_name: nginx-container
build: ./nginx
restart: always
ports:
- "80:80"
- "443:443"
volumes:
# linux
- api_data:/docker_api
- ./log:/var/log/nginx
- /etc/letsencrypt:/etc/letsencrypt
- ./demo/static:/docker_api/static
- ./demo/media:/docker_api/media
# mac
#- /usr/local/etc/nginx/
depends_on:
- web
web:
container_name: api-container
build: ./demo
restart: always
command: uwsgi --ini uwsgi.ini
volumes:
- api_data:/docker_api
- ./demo/static:/docker_api/static
- ./demo/media:/docker_api/media
depends_on:
- redis
migration_and_run_worker:
container_name: celery
environment:
- DJANGO_SETTINGS_MODULE=demo.settings.prod
build: ./demo
volumes:
- api_data:/docker_api
command: bash -c "python manage.py migrate && celery -A demo worker -l info"
depends_on:
- redis
volumes:
api_data: