Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (61 loc) · 2.12 KB
/
Copy pathdocker-compose.yml
File metadata and controls
65 lines (61 loc) · 2.12 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
64
65
# Local development and integration stack.
#
# Brings up PostgreSQL 16 for Serval. Point the app at it with:
# export DATABASE_URL=postgres://serval:serval@localhost:5432/serval
#
# The optional `serval` service runs the app itself once an image is built.
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: serval
POSTGRES_PASSWORD: serval
POSTGRES_DB: serval
ports:
- "5432:5432"
volumes:
- serval-pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U serval -d serval"]
interval: 5s
timeout: 5s
retries: 10
serval:
# Pull a published multi-arch image by default. Override SERVAL_IMAGE_TAG to
# track a channel or pin a version:
# stable — vetted releases (default; recommended for real use)
# latest — cutting-edge main builds that passed the CI quality gate
# v1.2.3 — a specific release
# To build from local source instead, run with the build profile:
# docker compose --profile build up --build
image: ghcr.io/btreemap/serval:${SERVAL_IMAGE_TAG:-stable}
profiles: ["app"]
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgres://serval:serval@postgres:5432/serval
# Route-id MAC secret. Override with a strong random value in production;
# the default below is for local/dev only (must be >= 32 chars).
ID_SIGNING_SECRET: ${ID_SIGNING_SECRET:-dev-only-insecure-id-signing-secret-change-me}
CONTROL_PLANE_ADDR: 0.0.0.0:8080
DATA_PLANE_ADDR: 0.0.0.0:3000
AUTH_MODE: none
RUST_LOG: info
ports:
- "8080:8080"
- "3000:3000"
# Same service, but built from the local checkout instead of pulled from GHCR.
# Selected via the `build` profile so the default `app` profile stays pull-only.
serval-local:
extends:
service: serval
build: .
image: serval:local
profiles: ["build"]
# `extends` does not copy depends_on, so restate the database dependency.
depends_on:
postgres:
condition: service_healthy
volumes:
serval-pgdata: