-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
36 lines (35 loc) · 1.16 KB
/
docker-compose.yml
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
version: '3'
services:
web:
image: apache
build:
context: ./webapp
args:
- http_proxy
- https_proxy
- no_proxy
container_name: apache
restart: always
# we can see the server running at "localhost:8080"
ports:
- "8081:80"
tty: true
e2e:
image: cypress
build: ./
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 web server in the "web" container is cooking
# see https://docs.docker.com/compose/networking/
environment:
- CYPRESS_baseUrl_DISABLED=http://web
command: npm run ci
# 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).
volumes:
- ./:/app/