Files
lincodex/deploy/docker/docker-compose.e2e-mail.yml
T

114 lines
3.5 KiB
YAML

# Local registration-mail overlay. It is selected only by the explicit
# registration E2E runner, never by default or release E2E.
services:
backend:
build:
context: ../../backend
dockerfile: Dockerfile.e2e
environment:
# Browser scenarios share one proxy address in this isolated stand.
IDENTITY_CLIENT_HOURLY_LIMIT: "200"
EMAIL_PROVIDER: resend
EMAIL_ACCOUNT: e2e
EMAIL_FROM: no-reply@example.com
RESEND_API_KEY: re_fixture_key
# Keep real resend coverage bounded within this isolated test stand.
VERIFICATION_MAIL_MIN_INTERVAL: 1s
E2E_CONSENT_FIXTURE: "1"
# The browser suite delivers the synthetic inbox event through the real
# pipeline; the production default is off.
NOTIFICATION_SYNTHETIC_ENABLED: "true"
# The fixture bank is synthetic, so a passed full test may receive the
# uncalibrated demonstration category after the runner attests the
# opening. Ordinary and release E2E keep the default false.
ASSESSMENT_DEMO_CATEGORIES_ENABLED: "true"
depends_on:
mail-fixture:
condition: service_healthy
playwright:
environment:
# The runner shares the frontend network namespace, so it can reach
# the fixture without publishing a host port.
E2E_MAILBOX_URL: http://mail-fixture:8025/__e2e/inbox
E2E_MAILBOX_TOKEN: local-e2e-mailbox-token
E2E_MAIL_FIXTURE: "1"
E2E_COMPANY_FIXTURE: "1"
E2E_QUESTIONNAIRE_FIXTURE: "1"
E2E_DEMO_CATEGORIES: "1"
E2E_CONSENT_FIXTURE: "1"
E2E_COMPANY_FIXTURE_URL: http://company-fixture:8081/company/memberships/revoke
E2E_COMPANY_FIXTURE_TOKEN: ${E2E_COMPANY_FIXTURE_TOKEN:?Set the per-run company fixture token}
company-fixture:
build:
context: ../../backend
dockerfile: Dockerfile.e2e
entrypoint: ["/company-fixture"]
environment:
E2E_COMPANY_FIXTURE: "1"
E2E_COMPANY_FIXTURE_TOKEN: ${E2E_COMPANY_FIXTURE_TOKEN:?Set the per-run company fixture token}
DATABASE_URL: postgres://${POSTGRES_USER:?Set POSTGRES_USER}:${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:?Set POSTGRES_DB}?sslmode=disable
expose:
- "8081"
read_only: true
cap_drop: [ALL]
security_opt: ["no-new-privileges:true"]
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "/company-fixture", "healthcheck"]
interval: 2s
timeout: 3s
retries: 15
start_period: 2s
stop_grace_period: 5s
networks:
- default
logging:
driver: json-file
options:
max-size: 1m
max-file: "2"
deploy:
resources:
limits:
cpus: "0.25"
memory: 128M
mail-fixture:
build:
context: ../../backend
dockerfile: Dockerfile.mail-fixture
expose:
- "8025"
read_only: true
cap_drop: [ALL]
security_opt: ["no-new-privileges:true"]
healthcheck:
test: ["CMD", "/mail-fixture", "healthcheck"]
interval: 2s
timeout: 3s
retries: 15
start_period: 2s
stop_grace_period: 5s
networks:
- default
logging:
driver: json-file
options:
max-size: 1m
max-file: "2"
deploy:
resources:
limits:
cpus: "0.25"
memory: 128M
networks:
default:
# The fixture and browser can talk on the throwaway app network, but no
# E2E container needs outbound access to a real provider.
internal: true