-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
57 lines (52 loc) · 1.55 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
# Inspired by https://docs.docker.com/compose/django/
version: '3'
services:
db:
# NOTE: No persistance storage configured.
# Using v14 to prevent schema permissions. See also docker-init-db.sql.
# See: https://hub.docker.com/_/postgres/
image: postgres:${PG_VERSION:-14}
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- ./docker-init-db.sql:/docker-entrypoint-initdb.d/init_db.sql
redis:
image: redis
web:
build: .
image: maykinmedia/referentielijsten-api:latest
environment: &app-env
DJANGO_SETTINGS_MODULE: referentielijsten.conf.docker
SECRET_KEY: ${SECRET_KEY:-django-insecure-4foe-_dk9x=88*0sljyo1_ga!!nj*x8ye6u0p(@871e)zg^+q}
DB_NAME: referentielijsten
DB_USER: referentielijsten
DB_HOST: db
CACHE_DEFAULT: redis:6379/0
CACHE_AXES: redis:6379/0
SUBPATH: ${SUBPATH:-/}
DISABLE_2FA: ${DISABLE_2FA:-True}
# Only allow all hosts for development/testing purposes!
ALLOWED_HOSTS: '*'
ports:
- 8000:8000
volumes: &app-volumes
- media:/app/media # Shared media volume to get access to saved OAS files
- ./docker/setup_configuration:/app/setup_configuration
depends_on:
web-init:
condition: service_completed_successfully
web-init:
build: .
environment:
<<: *app-env
#
# Django-setup-configuration
RUN_SETUP_CONFIG: ${RUN_SETUP_CONFIG:-true}
command: /setup_configuration.sh
depends_on:
- db
- redis
volumes: *app-volumes
volumes:
media:
db: