2024-02-15 17:10:39 +01:00
|
|
|
services:
|
|
|
|
postgres:
|
2024-09-25 23:00:00 +02:00
|
|
|
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
|
2024-03-28 17:16:38 +01:00
|
|
|
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}"
|
2024-03-13 19:12:55 +01:00
|
|
|
stop_grace_period: 24h
|
2024-04-13 17:45:02 +02:00
|
|
|
|
|
|
|
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:
|
2024-09-25 23:00:00 +02:00
|
|
|
- "0.0.0.0:11004:8080"
|
2024-04-13 17:45:02 +02:00
|
|
|
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
|
2024-09-25 23:00:00 +02:00
|
|
|
start_period: 12h
|
2024-09-07 14:48:19 +02:00
|
|
|
start_interval: 15s
|