Something went wrong. Try again.
Monorepo for wisp.place. A static site hosting service built on top of the AT Protocol.
Something went wrong. Try again.
wisp.place-monorepo docker-compose.e2e.yml
6.7 kB · 214 lines
YAML
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215services: postgres: image: postgres:16-alpine environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: wisp volumes: - e2e_postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d wisp"] interval: 5s timeout: 5s retries: 20
redis: image: redis:7-alpine volumes: - e2e_redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 20
minio: # See docker-compose.dev.yml: upstream MinIO images are no longer published. image: cgr.dev/chainguard/minio:latest-dev user: "0:0" command: server /data --console-address ":9001" environment: MINIO_ROOT_USER: minioadmin MINIO_ROOT_PASSWORD: minioadmin volumes: - e2e_minio_data:/data healthcheck: test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/9000"] interval: 5s timeout: 5s retries: 20
minio-create-bucket: image: cgr.dev/chainguard/minio:latest-dev depends_on: minio: condition: service_healthy environment: WISP_PUBLIC_BUCKET: wisp-e2e WISP_PRIVATE_BUCKET: wisp-private-e2e entrypoint: - /bin/sh - -c - | mc alias set local http://minio:9000 minioadmin minioadmin mc mb --ignore-existing "local/$${WISP_PUBLIC_BUCKET}" mc mb --ignore-existing "local/$${WISP_PRIVATE_BUCKET}"
main-app: build: context: . dockerfile: Dockerfile depends_on: postgres: condition: service_healthy redis: condition: service_healthy minio-create-bucket: condition: service_completed_successfully pds-init: condition: service_completed_successfully environment: NODE_ENV: development LOCAL_DEV: "true" PORT: "8000" DOMAIN: http://127.0.0.1:8000 DATABASE_URL: postgres://postgres:postgres@postgres:5432/wisp REDIS_URL: redis://redis:6379 DISABLE_DNS_WORKER: "true" BASE_DOMAIN: wisp.place PRIVATE_HOST: priv.wisp.localhost:3001 S3_BUCKET: wisp-e2e PRIVATE_S3_BUCKET: wisp-private-e2e S3_REGION: us-east-1 S3_ENDPOINT: http://minio:9000 S3_FORCE_PATH_STYLE: "true" AWS_ACCESS_KEY_ID: minioadmin AWS_SECRET_ACCESS_KEY: minioadmin OAUTH_HANDLE_RESOLVER_URL: http://pds:3300/xrpc/com.atproto.identity.resolveHandle OAUTH_PLC_DIRECTORY_URL: http://plc:2582 OAUTH_ALLOW_HTTP: "true" OAUTH_FETCH_REWRITE_FROM: http://localhost:3300 OAUTH_FETCH_REWRITE_TO: http://pds:3300 WISP_CACHE_INVALIDATION_STREAM: wisp:e2e:cache-invalidate-stream healthcheck: test: ["CMD-SHELL", "wget -q -O - http://127.0.0.1:8000/api/health >/dev/null"] interval: 5s timeout: 5s retries: 30
firehose-service: # The independent leadership supervisor/watchdog must be able to SIGKILL # the worker; namespace PID 1 intentionally cannot be killed from within. init: true build: context: . dockerfile: apps/firehose-service/Dockerfile depends_on: postgres: condition: service_healthy redis: condition: service_healthy minio-create-bucket: condition: service_completed_successfully pds-init: condition: service_completed_successfully environment: NODE_ENV: production LOCAL_DEV: "true" DATABASE_URL: postgres://postgres:postgres@postgres:5432/wisp REDIS_URL: redis://redis:6379 HEALTH_PORT: "3001" FIREHOSE_SERVICE: ${FIREHOSE_SERVICE:-ws://pds:3300} FIREHOSE_SERVICE_SECONDARY: ${FIREHOSE_SERVICE_SECONDARY:-} FIREHOSE_MAX_CONCURRENCY: "5" WISP_PLC_DIRECTORY_URL: http://plc:2582 PDS_FETCH_REWRITE_FROM: http://localhost:3300 PDS_FETCH_REWRITE_TO: http://pds:3300 S3_BUCKET: wisp-e2e S3_REGION: us-east-1 S3_ENDPOINT: http://minio:9000 S3_FORCE_PATH_STYLE: "true" S3_PREFIX: sites/ AWS_ACCESS_KEY_ID: minioadmin AWS_SECRET_ACCESS_KEY: minioadmin WISP_CACHE_INVALIDATION_STREAM: wisp:e2e:cache-invalidate-stream WISP_REVALIDATE_STREAM: wisp:e2e:revalidate healthcheck: test: ["CMD-SHELL", "wget -q -O - http://127.0.0.1:3001/health >/dev/null"] interval: 5s timeout: 5s retries: 30
hosting-service: build: context: . dockerfile: apps/hosting-service/Dockerfile depends_on: postgres: condition: service_healthy redis: condition: service_healthy minio-create-bucket: condition: service_completed_successfully environment: NODE_ENV: production PORT: "3001" DATABASE_URL: postgres://postgres:postgres@postgres:5432/wisp REDIS_URL: redis://redis:6379 BASE_HOST: wisp.place BASE_DOMAIN: wisp.place PRIVATE_HOST: priv.wisp.localhost CACHE_DIR: /cache/sites HOT_CACHE_TTL: "300" S3_BUCKET: wisp-e2e PRIVATE_S3_BUCKET: wisp-private-e2e S3_REGION: us-east-1 S3_ENDPOINT: http://minio:9000 S3_FORCE_PATH_STYLE: "true" S3_PREFIX: sites/ AWS_ACCESS_KEY_ID: minioadmin AWS_SECRET_ACCESS_KEY: minioadmin WISP_CACHE_INVALIDATION_STREAM: wisp:e2e:cache-invalidate-stream WISP_REVALIDATE_STREAM: wisp:e2e:revalidate WISP_CACHE_INVALIDATION_CURSOR_FILE: /cache/cache-invalidation.lastid volumes: - e2e_hosting_cache:/cache healthcheck: test: ["CMD-SHELL", "wget -q -O - http://127.0.0.1:3001/health >/dev/null"] interval: 5s timeout: 5s retries: 30
e2e-runner: build: context: . dockerfile: apps/main-app/e2e/Dockerfile depends_on: main-app: condition: service_healthy firehose-service: condition: service_healthy hosting-service: condition: service_healthy pds-init: condition: service_completed_successfully environment: E2E_ATPROTO_HANDLE: ${E2E_ATPROTO_HANDLE:-alice.test} E2E_ATPROTO_PASSWORD: ${E2E_ATPROTO_PASSWORD:-alice-dev-password} E2E_APP_URL: http://127.0.0.1:8000 E2E_APP_UPSTREAM: http://main-app:8000 E2E_HOSTING_URL: http://hosting-service:3001 E2E_HOSTING_BROWSER_URL: http://127.0.0.1:3001 E2E_PDS_BROWSER_URL: http://127.0.0.1:3300 E2E_PDS_UPSTREAM: http://pds:3300 E2E_FIREHOSE_URL: http://firehose-service:3001 E2E_CLEANUP: ${E2E_CLEANUP:-true} E2E_HEADLESS: ${E2E_HEADLESS:-true} E2E_TIMEOUT_MS: ${E2E_TIMEOUT_MS:-180000}
volumes: e2e_postgres_data: e2e_redis_data: e2e_minio_data: e2e_hosting_cache: