-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (60 loc) · 1.75 KB
/
Copy pathdocker-compose.yml
File metadata and controls
63 lines (60 loc) · 1.75 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
56
57
58
59
60
61
62
63
# Local development stack (builds images from the checkout, no Caddy/frontend). For a production
# self-hosted deployment use infra/docker-compose.yml; see docs/infra.md.
services:
db:
image: postgis/postgis:17-3.5-alpine
platform: linux/amd64
environment:
POSTGRES_USER: osmsg
POSTGRES_PASSWORD: osmsg
POSTGRES_DB: osmsg
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "${OSMSG_DB_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U osmsg -d osmsg"]
interval: 5s
timeout: 3s
retries: 10
restart: unless-stopped
api:
image: ghcr.io/osgeonepal/osmsg-api:latest
build:
context: .
target: api
environment:
DATABASE_URL: postgresql://osmsg:osmsg@db:5432/osmsg
ports:
- "8000:8000"
volumes:
- ./api:/app/api
command: ["--reload"]
depends_on:
db:
condition: service_healthy
restart: unless-stopped
worker:
image: ghcr.io/osgeonepal/osmsg-worker:latest
build:
context: .
target: worker
environment:
DATABASE_URL: postgresql://osmsg:osmsg@db:5432/osmsg
OSMSG_SCHEDULE: ${OSMSG_SCHEDULE:-*/2 * * * *}
OSMSG_BOOTSTRAP: ${OSMSG_BOOTSTRAP:-hour}
OSMSG_BOOTSTRAP_DAYS: ${OSMSG_BOOTSTRAP_DAYS:-}
OSM_USERNAME: ${OSM_USERNAME:-}
OSM_PASSWORD: ${OSM_PASSWORD:-}
OSMSG_EXTRA_ARGS: ${OSMSG_EXTRA_ARGS:---name stats --output-dir /var/lib/osmsg --cache-dir /var/cache/osmsg --format psql --psql-dsn postgresql://osmsg:osmsg@db:5432/osmsg}
volumes:
- osmsg-data:/var/lib/osmsg
- osmsg-cache:/var/cache/osmsg
depends_on:
db:
condition: service_healthy
restart: unless-stopped
volumes:
pgdata:
osmsg-data:
osmsg-cache: