-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
86 lines (79 loc) · 1.99 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
version: "3.5"
networks:
amsterdam-bouwdossiers:
name: amsterdam-bouwdossiers
driver: bridge
x-app: &base-app
build:
context: .
target: app
depends_on:
database:
condition: service_healthy
azurite:
condition: service_healthy
volumes:
- ./src:/src
- ./deploy:/deploy
networks:
- amsterdam-bouwdossiers
- default
environment: &base-app-env
SECRET_KEY: 'dev'
DATABASE_HOST: 'database'
PYTHONBREAKPOINT: true
UWSGI_STATIC_MAP: '/iiif-metadata/static=/static'
AZURITE_STORAGE_CONNECTION_STRING: 'AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;DefaultEndpointsProtocol=http;BlobEndpoint=http://azurite:10000/devstoreaccount1/;'
services:
database:
image: postgis/postgis:15-3.4
ports:
- 5432
environment:
POSTGRES_DB: dev
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
volumes:
- "~/.ssh/datapunt.key:/root/.ssh/datapunt.key"
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "dev", "-U", "dev" ]
interval: 10s
timeout: 5s
retries: 3
azurite:
image: mcr.microsoft.com/azure-storage/azurite
ports:
- 10000 # Blob service
healthcheck:
test: nc 127.0.0.1 10000 -z
interval: 1s
retries: 30
app:
<<: *base-app
build:
context: .
target: app
image: ${REGISTRY:-localhost:5000}/${REPOSITORY:-opdrachten/iiif-metadata-server}:${VERSION:-latest}
depends_on:
database:
condition: service_healthy
dev:
<<: *base-app
hostname: metadata-server
build:
context: .
target: dev
environment:
<<: *base-app-env
DEBUG: 'true'
USE_JWKS_TEST_KEY: 'true'
command: python manage.py runserver 0.0.0.0:8000
test:
<<: *base-app
build:
context: .
target: tests
environment:
<<: *base-app-env
USE_JWKS_TEST_KEY: 'true'
SECRET_KEY: 'insecure'