a6991079de
Add postgres to Devbox * addcmd
43 lines
963 B
YAML
43 lines
963 B
YAML
---
|
|
services:
|
|
test-db:
|
|
image: postgres:17.2-alpine3.21
|
|
ports:
|
|
- 5430:5432
|
|
environment:
|
|
POSTGRES_DB: ${PGDATABASE}
|
|
POSTGRES_PASSWORD: ${PGPASSWORD}
|
|
POSTGRES_USER: ${PGUSER}
|
|
expose:
|
|
- 5431
|
|
volumes:
|
|
- test-db-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${PGUSER}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- test-server-network
|
|
|
|
prometheus:
|
|
image: prom/prometheus:latest
|
|
ports:
|
|
- "9090:9090"
|
|
volumes:
|
|
- ./prometheus.localservice.yaml:/etc/prometheus/prometheus.yml
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--spider", "-q", "http://localhost:9090/-/healthy"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 30s
|
|
networks:
|
|
- test-server-network
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
volumes:
|
|
test-db-data:
|
|
networks:
|
|
test-server-network:
|