Created
May 28, 2019 16:47
-
-
Save aaronromeo/42e33c63b403191e9e4915382451d414 to your computer and use it in GitHub Desktop.
Getting Cypress to wait for the server to start
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM cypress/included:3.3.0 | |
RUN apt-get update && apt-get install -y wget | |
ENV DOCKERIZE_VERSION v0.6.1 | |
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | |
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | |
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz | |
RUN npm install cypress-image-snapshot@3.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
cypress: | |
build: | |
context: . | |
dockerfile: cypress.Dockerfile | |
depends_on: | |
- frontend | |
- mailcatcher | |
environment: | |
- CYPRESS_baseUrl=http://frontend:3030 | |
entrypoint: > | |
/bin/sh -c ' | |
which cypress | |
dockerize -wait tcp://frontend:3030 -timeout 300s | |
cypress run | |
' | |
working_dir: /apps/sut | |
volumes: | |
- ../../sut:/apps/sut | |
networks: | |
- default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment