-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
65 lines (59 loc) · 1.31 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
version: '3.8'
services:
redis:
container_name: redis
image: redis:7.4.0-alpine3.20
environment:
DOCKERIZED: true
networks:
- mynetwork
db:
container_name: postgres
image: postgres:13
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data/
networks:
- mynetwork
web:
container_name: django
build: .
command: "gunicorn favcription.wsgi:application --bind 0.0.0.0:8000"
# command: >
# sh -c "python manage.py migrate && gunicorn favcription.wsgi:application --bind 0.0.0.0:8000"
volumes:
- .:/app
ports:
- 8000:8000
depends_on:
- celery
environment:
DOCKERIZED: true
DATABASE_URL: ${DATABASE_URL}
networks:
- mynetwork
celery:
container_name: celery
build:
context: .
command: celery --app=favcription worker -l INFO
volumes:
- .:/app
depends_on:
- redis
- db
environment:
DOCKERIZED: true
DATABASE_URL: ${DATABASE_URL}
CELERY_BROKER_URL: redis://redis:6379/0
CELERY_RESULT_BACKEND: redis://redis:6379/0
networks:
- mynetwork
volumes:
postgres_data:
networks:
mynetwork:
driver: bridge