-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.server.yml
More file actions
38 lines (36 loc) · 1.03 KB
/
Copy pathdocker-compose.server.yml
File metadata and controls
38 lines (36 loc) · 1.03 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
services:
db:
image: library/postgres:15.2-alpine
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- benchdb_server_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 2s
timeout: 5s
retries: 10
server:
build:
context: .
dockerfile: Dockerfile.server
environment:
BENCHDB_ADDR: ":8080"
BENCHDB_DB_URL: "postgres://postgres:postgres@db:5432/postgres?sslmode=disable"
BENCHDB_INIT_SCHEMA: "true"
BENCHDB_SEED: "true"
BENCHDB_AUTH_DISABLED: "${DCOMP_BENCHDB_AUTH_DISABLED:-true}"
depends_on:
db:
condition: service_healthy
ports:
- "${DCOMP_BENCHDB_SERVER_HOST_PORT:-127.0.0.1:8080}:8080"
healthcheck:
test: [ "CMD", "/usr/local/bin/benchdb", "series", "list", "--server", "http://127.0.0.1:8080", "--page-size", "1" ]
interval: 5s
timeout: 10s
retries: 12
volumes:
benchdb_server_data: