dd2eebf13a
Testing Options and Clean Up * bitsandbobs * lint * healthchecks * imgintests * singlegenerate * testclean * network * networkclean * cmds
43 lines
1007 B
YAML
43 lines
1007 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", "sh", "-c", "pg_isready -U ${PGUSER} && psql -U ${PGUSER} -c 'SELECT 1'"]
|
|
interval: 500ms
|
|
timeout: 5s
|
|
retries: 50
|
|
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:
|