# Isolated from the dev and test stacks — see the note in docker-compose.yml. name: happyview-e2e services: postgres: image: postgres:17 environment: POSTGRES_USER: happyview POSTGRES_PASSWORD: happyview POSTGRES_DB: happyview_test ports: - "5434:5432" volumes: - ./scripts/init-e2e-dbs.sql:/docker-entrypoint-initdb.d/init-e2e-dbs.sql:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U happyview -d happyview_test"] interval: 5s timeout: 5s retries: 10 start_period: 5s plc: build: context: https://github.com/did-method-plc/did-method-plc.git dockerfile: packages/server/Dockerfile environment: DB_CREDS_JSON: '{"username":"happyview","password":"happyview","host":"postgres","port":"5432","database":"plc"}' ENABLE_MIGRATIONS: "true" DB_MIGRATE_CREDS_JSON: '{"username":"happyview","password":"happyview","host":"postgres","port":"5432","database":"plc"}' PORT: "2582" ports: - "2582:2582" depends_on: postgres: condition: service_healthy pds: image: ghcr.io/gamesgamesgamesgamesgames/tranquil-dev:latest environment: DATABASE_URL: postgres://happyview:happyview@postgres:5432/pds PLC_DIRECTORY_URL: http://plc:2582 TRANQUIL_PDS_ALLOW_INSECURE_SECRETS: "1" DISABLE_RATE_LIMITING: "true" DISABLE_ACCOUNT_VERIFICATION_GATE: "true" volumes: - ./scripts/e2e-config.toml:/etc/tranquil-pds/config.toml:ro ports: - "3100:3000" depends_on: postgres: condition: service_healthy plc: condition: service_started caddy: image: caddy:2-alpine volumes: - ./scripts/e2e-Caddyfile:/etc/caddy/Caddyfile:ro - caddy_data:/data ports: - "443:443" networks: default: aliases: - pds.localhost - happyview.127-0-0-1.sslip.io healthcheck: test: ["CMD-SHELL", "test -f /data/caddy/pki/authorities/local/root.crt"] interval: 2s timeout: 3s retries: 60 start_period: 2s happyview: build: context: . dockerfile: Dockerfile # The image runs as the non-root `app` user, but the e2e entrypoint needs # root to read Caddy's root-owned CA and install it into the trust store. It # drops back to `app` before launching the server. user: root entrypoint: ["/bin/sh", "/e2e-entrypoint.sh"] environment: DATABASE_URL: postgres://happyview:happyview@postgres:5432/happyview_test PUBLIC_URL: https://happyview.127-0-0-1.sslip.io HOST: 0.0.0.0 PORT: "3000" PLC_URL: http://plc:2582 RELAY_URL: http://plc:2582 SESSION_SECRET: e2e-test-secret-that-is-at-least-32-bytes TOKEN_ENCRYPTION_KEY: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= JETSTREAM_URL: wss://jetstream1.us-east.bsky.network ports: - "3200:3000" volumes: - ./scripts/e2e-entrypoint.sh:/e2e-entrypoint.sh:ro - caddy_data:/caddy-data:ro depends_on: postgres: condition: service_healthy plc: condition: service_started caddy: condition: service_healthy volumes: caddy_data: networks: default: enable_ipv6: true ipam: config: - subnet: 3fff:e2e::/64