plc-mirror/docker-compose.yml

51 lines
1.3 KiB
YAML
Raw Normal View History

2024-02-15 17:10:39 +01:00
services:
postgres:
image: "postgres:16"
2024-02-15 17:10:39 +01:00
volumes:
- "${DATA_DIR:?specify data dir in .env file}/postgres:/var/lib/postgresql/data:rw"
restart: always
healthcheck:
test: pg_isready -h localhost -U postgres
interval: 30s
timeout: 5s
retries: 3
start_period: 1h
start_interval: 3s
2024-02-18 21:00:39 +01:00
extra_hosts:
- "host.docker.internal:host-gateway"
2024-02-15 17:10:39 +01:00
environment:
POSTGRES_DB: bluesky
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:?specify password in .env file}"
stop_grace_period: 24h
plc:
build:
context: .
dockerfile: cmd/plc-mirror/Dockerfile
extra_hosts:
- "host.docker.internal:host-gateway"
restart: always
image: uabluerail/plc-mirror
deploy:
resources:
limits:
memory: 1G
links:
- postgres:db
depends_on:
postgres:
condition: service_healthy
environment:
PLC_METRICS_PORT: '8080'
PLC_POSTGRES_URL: "postgres://postgres:${POSTGRES_PASSWORD}@db/bluesky?sslmode=disable"
ports:
- "0.0.0.0:11004:8080"
command: [ "--log-level=0" ]
2024-09-07 14:48:19 +02:00
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/ready"]
interval: 30s
timeout: 5s
retries: 30
start_period: 12h
2024-09-07 14:48:19 +02:00
start_interval: 15s