-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
58 lines (49 loc) · 1.21 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
version: '3.7'
services:
rabbitmq:
restart: always
container_name: "rabbitmq"
hostname: rabbitmq
image: "rabbitmq:3-management"
# ports:
# - "15672:15672"
# - "5672:5672"
volumes:
- ./data/rabbitmq:/var/lib/rabbitmq
- ./rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
db:
container_name: "gc_postgres"
image: "postgres"
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- ./data/post/:/var/lib/postgresql/data/
# ports:
# - '5432:5432'
app:
container_name: "gc_app"
build:
context: .
target: DJANGO_APP
volumes:
- ./data/staticfiles:/app/staticfiles
- .:/app
ports:
- '8000:8000'
command: gunicorn --env DJANGO_SETTINGS_MODULE=GD.settings.production GD.wsgi:application --bind 0.0.0.0:8000
environment:
- DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
- CELERY_BROKER=amqp://guest:guest@rabbitmq:5672/
depends_on:
- rabbitmq
- db
celery:
container_name: "gc_celery"
build: .
command : celery -A GD worker -l INFO
volumes:
- .:/app
env_file: .env
depends_on:
- rabbitmq