services: postgres: image: "postgres:16" 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 extra_hosts: - "host.docker.internal:host-gateway" 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" ] healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/ready"] interval: 30s timeout: 5s retries: 30 start_period: 12h start_interval: 15s