2022-07-07 17:28:46 +02:00
|
|
|
services:
|
|
|
|
zitadel:
|
|
|
|
image: 'zitadel:${BUILD_DATE}'
|
2022-07-25 15:24:16 +02:00
|
|
|
environment:
|
|
|
|
# TODO: ugly
|
|
|
|
ZITADEL_EXTERNALDOMAIN: zitadel
|
|
|
|
ZITADEL_S3DEFAULTINSTANCE_CUSTOMDOMAIN: zitadel
|
|
|
|
|
|
|
|
e2e-setup:
|
|
|
|
command: ./e2e/e2e-setup.sh
|
|
|
|
build:
|
|
|
|
dockerfile: ./build/e2e/Dockerfile
|
|
|
|
context: ..
|
|
|
|
container_name: e2e-setup
|
|
|
|
env_file:
|
|
|
|
- ./compose.env
|
|
|
|
environment:
|
|
|
|
ZITADEL_DATABASE_HOST: db
|
|
|
|
depends_on:
|
|
|
|
zitadel:
|
|
|
|
condition: service_started
|
|
|
|
networks:
|
|
|
|
- 'zitadel'
|
|
|
|
# TODO: See PR #3816
|
|
|
|
# condition: 'service_healthy'
|
|
|
|
|
2022-07-21 17:04:53 +02:00
|
|
|
e2e:
|
|
|
|
image: cypress/included:10.3.0
|
|
|
|
#build: ./e2e
|
|
|
|
container_name: cypress
|
|
|
|
depends_on:
|
2022-07-25 15:24:16 +02:00
|
|
|
e2e-setup:
|
|
|
|
condition: 'service_completed_successfully'
|
|
|
|
command: ./cypress.sh run
|
2022-07-21 17:04:53 +02:00
|
|
|
# note: inside e2e container, the network allows accessing
|
|
|
|
# "zitadel" host under name "zitadel"
|
|
|
|
# so "curl http://web" would return whatever the webserver
|
|
|
|
# in the "web" container is cooking
|
|
|
|
# see https://docs.docker.com/compose/networking/
|
|
|
|
#environment:
|
|
|
|
# - CYPRESS_baseUrl=http://web
|
|
|
|
#command: npx cypress run
|
|
|
|
# mount the host directory e2e/cypress and the file e2e/cypress.config.js as
|
|
|
|
# volumes within the container
|
|
|
|
# this means that:
|
|
|
|
# 1. anything that Cypress writes to these folders (e.g., screenshots,
|
|
|
|
# videos) appears also on the Docker host's filesystem
|
|
|
|
# 2. any change that the developer applies to Cypress files on the host
|
|
|
|
# machine immediately takes effect within the e2e container (no docker
|
|
|
|
# rebuild required).
|
|
|
|
working_dir: /e2e
|
|
|
|
volumes:
|
2022-07-25 15:24:16 +02:00
|
|
|
- ./console:/e2e
|
|
|
|
networks:
|
|
|
|
- 'zitadel'
|