-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (62 loc) · 1.74 KB
/
docker-compose.yml
File metadata and controls
65 lines (62 loc) · 1.74 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
version: "3.8"
services:
app:
build:
context: ./
dockerfile: ./docker/app/Dockerfile
command: >
sh -c "python manage.py migrate && gunicorn core.wsgi:application --bind 0.0.0.0:8000 --timeout 600"
container_name: wfms-app
restart: unless-stopped
volumes:
- ./:/home/app
env_file:
- ./.env
networks:
- wfms-network
ports:
- "${EXPOSED_DJANGO_PORT}:8000"
worker:
restart: unless-stopped
build:
context: ./
dockerfile: ./docker/app/Dockerfile
entrypoint: /home/app/docker/app/worker-entrypoint.sh
container_name: wfms-worker
volumes:
- './:/home/app'
env_file:
- './.env'
networks:
- 'wfms-network'
environment:
DEBUG: 'False'
CELERY_BROKER_URL: '${CELERY_BROKER_URL}'
CELERY_RESULT_BACKEND: '${CELERY_RESULT_BACKEND}'
DJANGO_DB: postgresql
POSTGRES_DB: '${DB_NAME}'
POSTGRES_HOST: '${DB_HOST}'
POSTGRES_USER: '${DB_USER}'
POSTGRES_PASSWORD: '${DB_PASSWORD}'
POSTGRES_PORT: '${DB_PORT}'
depends_on:
- app
- redis
redis:
restart: unless-stopped
image: redis:latest
hostname: redis
container_name: wfms-redis
ports:
- '${CELERY_BROKER_PORT}:${CELERY_BROKER_PORT}'
env_file:
- './.env'
command: redis-server --requirepass ${REDIS_PASSWORD}
networks:
- wfms-network
networks:
wfms-network:
driver: bridge
ipam:
config:
- subnet: 130.89.7.0/24