-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (52 loc) · 1.53 KB
/
docker-compose.yml
File metadata and controls
55 lines (52 loc) · 1.53 KB
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
# keep docker-compose.yml in root directory to configure with root .env
services:
db:
image: postgis/postgis:17-3.5
# build:
# context: .
# dockerfile: ./docker/db/Dockerfile
# platform: linux/amd64
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=ocotilloapi_dev
ports:
- "5432:5432"
volumes:
- postgres_data_dev:/var/lib/postgresql/data
- ./docker/db/init:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ocotilloapi_dev"]
interval: 2s
timeout: 5s
retries: 20
app:
build:
context: .
dockerfile: ./docker/app/Dockerfile
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=ocotilloapi_dev
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- MODE=${MODE}
- AUTHENTIK_DISABLE_AUTHENTICATION=${AUTHENTIK_DISABLE_AUTHENTICATION}
- SESSION_SECRET_KEY=${SESSION_SECRET_KEY}
- PYGEOAPI_POSTGRES_HOST=db
- PYGEOAPI_POSTGRES_PORT=5432
- PYGEOAPI_POSTGRES_DB=ocotilloapi_dev
- PYGEOAPI_POSTGRES_USER=${POSTGRES_USER}
- PYGEOAPI_POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- GOOGLE_APPLICATION_CREDENTIALS=/app/gcs_credentials.json
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy # <-- wait for DB to be ready
links:
- db
volumes:
- .:/app
volumes:
postgres_data_dev: