services: pocket-id-db: container_name: pocket-id-db image: docker.io/library/postgres:17.7@sha256:dca7512acaa113409df7e40d977d801e53c0c8088e45d4311a45b4065ccfdcd3 restart: unless-stopped environment: - POSTGRES_USER=${POSTGRES_USER} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - POSTGRES_DB=${POSTGRES_DB} volumes: - ${APPDATA_PATH}/pocket-id/db:/var/lib/postgresql/data networks: - backend healthcheck: test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}"] interval: 10s timeout: 5s retries: 3 start_period: 10s pocket-id: container_name: pocket-id image: ghcr.io/pocket-id/pocket-id:v1.15.0-distroless@sha256:102e9dcb75f15adfd154ef7eab0ce36c36d82fc7a56cfb006ced980cfaa3a188 restart: unless-stopped depends_on: pocket-id-db: condition: service_healthy read_only: true user: ${PUID}:${PGID} environment: - APP_URL=${APP_URL} - TRUST_PROXY=${TRUST_PROXY} - MAXMIND_LICENSE_KEY=${MAXMIND_LICENSE_KEY} - PUID=${PUID} - PGID=${PGID} - ANALYTICS_DISABLED=${ANALYTICS_DISABLED} - DB_PROVIDER=postgres - DB_CONNECTION_STRING=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@pocket-id-db:5432/${POSTGRES_DB} volumes: - ${APPDATA_PATH}/pocket-id/data:/app/data ports: - ${PORT}:1411 networks: - frontend - backend healthcheck: test: [ "CMD", "/app/pocket-id", "healthcheck" ] interval: 10s timeout: 5s retries: 3 start_period: 10s networks: frontend: external: true backend: external: true