zitadel/e2e/docker-compose-overwrite.yaml
2022-07-25 15:51:33 +02:00

61 lines
1.8 KiB
YAML

services:
zitadel:
image: 'zitadel:${BUILD_DATE}'
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
networks:
- 'zitadel'
volumes:
- ${PWD}/.keys/e2e.json:/.keys/e2e.json
depends_on:
zitadel:
# TODO: See PR #3816
# condition: 'service_healthy'
condition: service_started
e2e:
image: cypress/included:10.3.0
#build: ./e2e
container_name: cypress
depends_on:
e2e-setup:
condition: 'service_completed_successfully'
env_file:
- ./compose.env
command: ./cypress.sh run
volumes:
- ${PWD}/.keys/e2e.json:/.keys/e2e.json
# 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:
- ./console:/e2e
networks:
- 'zitadel'