-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
82 lines (80 loc) · 2.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
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
services:
database:
image: postgis/postgis:14-3.2
restart: always
user: postgres
shm_size: 128mb
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-U", "$${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 10s
timeout: 60s
retries: 5
start_period: 20s
ports:
- "5415:5432"
environment:
POSTGRES_DB: dataservices
POSTGRES_USER: postgres
POSTGRES_PASSWORD: insecure
command: ["postgres", "-c", "log_statement=all"]
web:
build:
context: src/
args:
PIP_REQUIREMENTS: requirements_dev.txt
ports:
- "8090:8000"
links:
- database
- schemas
depends_on:
database:
condition: service_healthy
redis:
condition: service_started
environment:
UWSGI_HTTP_SOCKET: ":8000"
UWSGI_MODULE: "dso_api.wsgi"
UWSGI_CALLABLE: "application"
UWSGI_MASTER: 1
UWSGI_STATIC_MAP: "/dso_api/static=/static"
SECRET_KEY: insecure
DATABASE_URL: "${DATABASE_URL:-postgresql://postgres:insecure@database/dataservices}"
DJANGO_LOG_LEVEL: "${DJANGO_LOG_LEVEL:-INFO}"
DSO_API_LOG_LEVEL: "${DSO_API_LOG_LEVEL:-INFO}"
DSO_API_AUDIT_LOG_LEVEL: "${DSO_API_AUDIT_LOG_LEVEL:-INFO}"
AZURE_APPI_AUDIT_CONNECTION_STRING: "${AZURE_APPI_AUDIT_CONNECTION_STRING}"
AZURE_APPI_CONNECTION_STRING: "${AZURE_APPI_CONNECTION_STRING}"
OAUTH_CLIENT_ID: "${OAUTH_CLIENT_ID}"
OAUTH_JWKS_URL: "${OAUTH_JWKS_URL}"
PUB_JWKS: "$(cat src/jwks_test.json)"
OAUTH_URL: "${OAUTH_URL}"
CLOUD_ENV: "${CLOUD_ENV}"
DATAPUNT_API_URL: "${DATAPUNT_API_URL}"
DJANGO_DEBUG: 1
APIKEY_ENABLED: "${APIKEY_ENABLED}"
INITIALIZE_DB: "${INITIALIZE_DB:-true}"
MOCK_DATA: "${MOCK_DATA:-false}"
SCHEMA_URL: "http://schemas/datasets/" # "https://schemas.data.amsterdam.nl/datasets/"
volumes:
- ./src:/app
- ./docs/build/html:/docs-static
- "../amsterdam-schema/datasets:/tmp/datasets"
- "../schema-tools:/tmp/schema-tools"
command: >
/bin/bash -c "sh /app/initialize_db.sh
&& uwsgi --py-auto-reload=1 --enable-threads --lazy-apps --buffer-size=65535"
redis:
image: 'bitnami/redis:latest'
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- '6379:6379'
schemas:
image: nginx
ports:
- "8080:80"
volumes:
- "./schemas/data/datasets:/usr/share/nginx/html/datasets"
- "./schemas/data/publishers:/usr/share/nginx/html/publishers"
- "./schemas/conf/default.conf:/etc/nginx/conf.d/default.conf"