Cypress 7 Docker Deployment Instructions - projectcypress/cypress GitHub Wiki

Steps to Deploy Cypress Using Docker:

  1. 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
      
  2. 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
      
  3. Configure Environment Variables:

    • Open the docker-compose.yml file and update the following environment variables:

      • USE_SSL:

        • Set USE_SSL to true 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 and key.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 to false.
      • 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 in docker-compose.yml.
  4. 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.
  5. Verify Deployment:

    • Check that the containers are running:
      docker ps
      
    • Access the application via the appropriate URL:
      • If USE_SSL=true, access it via https://<your-domain>.
      • If USE_SSL=false, access it via http://<your-domain>.
  6. 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.