-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
39 lines (38 loc) · 1.19 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
version: '3'
services:
web:
build:
context: ./
dockerfile: ./Dockerfile
container_name: web
restart: always
# we can see the server running at "localhost:8080"
ports:
- '80:80'
e2e:
image: cypress/included:9.5.0
# build: ./cypress
container_name: cypress
depends_on:
- web
# note: inside e2e container, the network allows accessing
# "web" host under name "web"
# 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
- ENV=docker
- BUILDKITE_TOKEN
command: npx cy:docker
# mount the host directory e2e/cypress and the file e2e/cypress.json 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:
- ./:/e2e