version: '3.8' name: localdev-plc volumes: plc_db: plc_ts: plc_tls: services: db: image: postgres:14.4-alpine restart: unless-stopped environment: - POSTGRES_USER=pg - POSTGRES_PASSWORD=password healthcheck: test: 'pg_isready -U pg' interval: 500ms timeout: 10s retries: 20 volumes: - plc_db:/var/lib/postgresql/data - ./init.sql:/docker-entrypoint-initdb.d/init.sql app: depends_on: db: condition: service_healthy restart: true image: plcjs restart: unless-stopped environment: - DATABASE_URL=postgres://pg:password@db/plc - DEBUG_MODE=1 - LOG_ENABLED=true - LOG_LEVEL=debug - DB_CREDS_JSON={"username":"pg","password":"password","host":"db","port":"5432","database":"plc"} - DB_MIGRATE_CREDS_JSON={"username":"pg","password":"password","host":"db","port":"5432","database":"plc"} - ENABLE_MIGRATIONS=true - LOG_DESTINATION=1 ports: - '3000:3000' tailscale: image: tailscale/tailscale:latest restart: unless-stopped environment: # OPTIONAL - TS_AUTHKEY=YOUR-TS-KEY-GOES-HERE - TS_STATE_DIR=/var/run/tailscale - TS_HOSTNAME=plc volumes: - plc_tls:/mnt/tls - plc_ts:/var/run/tailscale nginx: image: nginx restart: unless-stopped network_mode: service:tailscale volumes: - ./nginx.conf:/etc/nginx/nginx.conf - plc_tls:/mnt/tls:ro