-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
71 lines (65 loc) · 1.7 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
# Inspired by https://docs.docker.com/compose/django/
version: '3'
services:
db:
# NOTE: No persistance storage configured.
# See: https://hub.docker.com/_/postgres/
image: postgres
environment:
POSTGRES_HOST_AUTH_METHOD: trust
# NOTE: this works for bitnami, not sure if this works for regular
# postgres image
volumes:
- ./docker-init-db.sql:/docker-entrypoint-initdb.d/init_db.sql
- db:/var/lib/postgresql/data
web:
image: maykinmedia/open-klant:latest
build: .
environment: &web_env
DJANGO_SETTINGS_MODULE: openklant.conf.docker
IS_HTTPS: no
DB_NAME: postgres
DB_USER: postgres
DB_HOST: db
ALLOWED_HOSTS: '*'
CACHE_DEFAULT: redis:6379/0
CACHE_AXES: redis:6379/0
SUBPATH: ${SUBPATH:-/}
SECRET_KEY: ${SECRET_KEY:-django-insecure-f8s@b*ds4t84-q_2#c0j0506@!l2q6r5_pq5e!vm^_9c*#^66b}
CELERY_BROKER_UR: redis://redis:6379/0
CELERY_RESULT_BACKEND: redis://redis:6379/0
DISABLE_2FA: true
volumes:
- media:/app/media
- private_media:/app/private_media
- log:/app/log
ports:
- 8000:8000
depends_on:
db:
condition: service_started
redis:
condition: service_started
web-init:
condition: service_completed_successfully
web-init:
build: .
environment:
<<: *web_env
#
# Django-setup-configuration
RUN_SETUP_CONFIG: ${RUN_SETUP_CONFIG:-true}
command: /setup_configuration.sh
volumes:
- log:/app/log
- ./docker/setup_configuration:/app/setup_configuration
depends_on:
- db
- redis
redis:
image: redis
volumes:
db:
log:
media:
private_media: