forked from coders4help/volunteer_planner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
102 lines (86 loc) · 2.24 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
version: '3.7'
x-network: &default-network
vp:
x-logging: &default-logging
driver: local
options:
max-size: 10m
max-file: 3
x-django-env: &default-django-environment
DJANGO_SETTINGS_MODULE: ${DJANGO_SETTINGS_MODULE-volunteer_planner.settings.local_postgres}
DATABASE_ENGINE: ${DATABASE_ENGINE:-django.db.backends.postgresql}
DATABASE_HOST: db
DATABASE_NAME: ${DATABASE_NAME-volunteer_planner}
DATABASE_USER: ${DATABASE_USER-vp}
DATABASE_PW: ${DATABASE_PW-volunteer_planner}
REDIS_HOST: ${REDIS_HOST:-redis}
services:
db:
image: vp_pg:local
build:
context: docker/db/
args:
- DATABASE_NAME
- DATABASE_USER
- DATABASE_PW
volumes:
- data_volume_pg:/var/lib/postgresql/data
networks:
<<: *default-network
hostname: db
logging: *default-logging
stop_grace_period: 30s
django:
image: vp_django:local
build:
context: ./
args:
- VP_BASE_DIR=${VP_BASE_DIR:-/opt/vp}
- DEV=True
command:
- runserver
- 0.0.0.0:8000
volumes:
- ./:/opt/vp
networks:
<<: *default-network
ports:
- "8000:8000"
hostname: django
links:
- db
- redis
logging: *default-logging
stop_grace_period: 10s
environment:
<<: *default-django-environment
ALLOWED_HOSTS: ${ALLOWED_HOSTS:-localhost}
SECRET_KEY: ${SECRET_KEY?Please set djangos SECRET_KEY in .env or container creation environment}
ADMIN_EMAIL: ${ADMIN_EMAIL:-admin@localhost}
DJANGO_FROM_EMAIL: ${DJANGO_FROM_EMAIL:-admin@localhost}
DJANGO_SERVER_EMAIL: ${DJANGO_SERVER_EMAIL:-admin@localhost}
DJANGO_EMAIL_BACKEND: ${DJANGO_EMAIL_BACKEND:-django.core.mail.backends.console.EmailBackend}
DJANGO_EMAIL_HOST:
DJANGO_EMAIL_PORT:
redis:
image: redis:6-alpine
networks:
<<: *default-network
logging: *default-logging
celery:
image: vp_django:local
entrypoint:
- /celery-entrypoint.sh
links:
- redis
networks:
<<: *default-network
logging: *default-logging
environment:
<<: *default-django-environment
CELERY_BEAT_SCHEDULER:
volumes:
data_volume_pg:
networks:
<<: *default-network
# vim: ts=2:sts=2:sw=2:ai:et