Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martindevnow/c1b16ac302788e94e602fb695ede44f1 to your computer and use it in GitHub Desktop.
Save martindevnow/c1b16ac302788e94e602fb695ede44f1 to your computer and use it in GitHub Desktop.
version: '3.2'
services:
web:
image: YOUR_DOCKER_HUB_ACCOUNT/${IMAGE_NAME}:${TAG}
tty: true
environment:
- NODE_ENV=production
command: >
http-server -p 80 /app
cypress:
command: >
./node_modules/.bin/cypress run
depends_on:
- web
environment:
- TAG=${TAG}
- IMAGE_NAME=${IMAGE_NAME}
- CYPRESS_baseUrl=http://web:80/
- CYPRESS_browser=chrome
- CYPRESS_screenshotsFolder=/results/${TAG}/screenshots
- CYPRESS_videosFolder=/results/${TAG}/videos
build:
context: .
# target: e2eBuild # Supported in v3.4 of Docker-Compose
dockerfile: ./cypress/Dockerfile.cypress
volumes:
- type: bind
source: ./results
target: /results
- type: bind
source: ./tests
target: /e2e/tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment