Cypress 7 Docker Deployment Instructions - projectcypress/cypress GitHub Wiki
Steps to Deploy Cypress Using Docker:
-
Ensure Docker is Installed:
- Verify that Docker is installed on your deployment environment (Linux VM or local machine). You can check by running:
docker --version
- Verify that Docker is installed on your deployment environment (Linux VM or local machine). You can check by running:
-
Clone the Cypress Repository:
- Clone the Cypress repository to your deployment environment and switch to the
cypress_v7
branch:git clone https://github.com/projectcypress/cypress.git cd cypress git checkout cypress_v7
- Clone the Cypress repository to your deployment environment and switch to the
-
Configure Environment Variables:
-
Open the
docker-compose.yml
file and update the following environment variables:-
USE_SSL:
- Set
USE_SSL
totrue
if you want to serve the app over HTTPS. For reference and local deployment, self-signed certs are present in the./docker/nginx/ssl-certs
directory. For production deployment, ensure that valid SSL certificates (cert.txt
andkey.txt
) are placed in./docker/nginx/ssl-certs
, replacing the existing reference certs. NOTE: file names must be the same. - If you want to serve the app over HTTP, set
USE_SSL
tofalse
.
- Set
-
SECRET_KEY_BASE:
- Replace the example
SECRET_KEY_BASE
with a securely generated key. You can generate a new key using:openssl rand -hex 64
- Copy the generated key and paste it into the
SECRET_KEY_BASE
field indocker-compose.yml
.
- Replace the example
-
-
-
Spin Up the Application:
- Start the application using Docker Compose:
docker-compose up -d
- The
-d
flag runs the containers in detached mode, meaning they will run in the background.
- Start the application using Docker Compose:
-
Verify Deployment:
- Check that the containers are running:
docker ps
- Access the application via the appropriate URL:
- If
USE_SSL=true
, access it viahttps://<your-domain>
. - If
USE_SSL=false
, access it viahttp://<your-domain>
.
- If
- Check that the containers are running:
-
Once you have completed the Cypress deployment, proceed to Initial Setup. You can disregard the TLS/SSL section of the Initial Setup instructions since we've already configured that in our Docker deployment.