-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose-celery.yml
More file actions
executable file
·66 lines (59 loc) · 1.68 KB
/
docker-compose-celery.yml
File metadata and controls
executable file
·66 lines (59 loc) · 1.68 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
version: '3.3'
services:
web:
restart: always
build: .
volumes:
- ./codes:/home/web/codes
- /opt/pysfapp/media:/home/web/codes/media
ports:
- 8040:8000
command: bash -c "python3 manage.py runserver 0.0.0.0:8000"
# command: bash -c "/usr/local/bin/gunicorn --bind :8000 --timeout 999 --workers 8 --env DJANGO_SETTINGS_MODULE=web.settings web.wsgi:application"
environment:
- db
- db_password
- db_user
entrypoint: /entrypoint.sh
networks:
- backend
redis:
restart: always
image: redis
hostname: redis
volumes:
- /opt/redis-app:/data
- ./codes:/home/web/codes
networks:
- backend
celery:
# image: "python_sfapp_celery_worker"
restart: always
build: .
# command: bash -c "cd codes/ && celery -A web worker -l info"
command: bash -c "celery -A web worker -l info"
volumes:
- ./codes:/home/web/codes
# - ./codes:/code/codes
networks:
- backend
depends_on:
- redis
celery-beat:
# image: "python_sfapp_celery_worker"
restart: always
build: .
# command: celery -A web beat -l info
# command: bash -c "cd codes/ && celery -A web beat -l info"
command: bash -c "celery -A web beat -l info"
volumes:
- ./codes:/home/web/codes
# - ./codes:/code/codes
networks:
- backend
depends_on:
- redis
networks:
backend:
external:
name: api_network