Heroku
Sorry-cypress installation instructions for Heroku

Basic sorry-cypress Setup

Click the button below to deploy the basic, in-memory, standalone director service to Heroku.

Full sorry-cypress kit on Heroku

  • Download and install the Heroku CLI
  • You must have Docker set up locally to continue
We'll create 3 separate Heroku applications - one for each service. Publicly available docker images of 3 services are available at:
The images are automatically updated on each release and tagged in accordance with GitHub releases.
sorry-cypress uses MongoDB as a persistence layer for storing and retrieving test results. We'll use a free hosted solution to run a managed instance of Atlas MongoDB.

Creating Heroku Application

Create 3 new Heroku application and give them appropriate names
1
heroku create <prefix>-director
2
heroku create <prefix>-api
3
heroku create <prefix>-dashboard
Copied!
Run the commands to deploy director , API and Dashboard services
1
# Sign into Heroku Container Registry.
2
heroku container:login
3
4
# Pull services image
5
docker pull agoldis/sorry-cypress-director:latest
6
docker pull agoldis/sorry-cypress-api:latest
7
docker pull agoldis/sorry-cypress-dashboard:latest
8
9
# Tag service images as Heroku app image
10
docker tag agoldis/sorry-cypress-director:latest registry.heroku.com/<name_of_director_app>/web
11
docker tag agoldis/sorry-cypress-api:latest registry.heroku.com/<name_of_api_app>/web
12
docker tag agoldis/sorry-cypress-dashboard:latest registry.heroku.com/<name_of_dashboard_app>/web
13
14
# Push the images to Heroku Container Registry
15
docker push registry.heroku.com/<name_of_director_app>/web
16
docker push registry.heroku.com/<name_of_api_app>/web
17
docker push registry.heroku.com/<name_of_dashboard_app>/web
18
19
# Deploy the image
20
heroku container:release --app <name_of_director_app> web
21
heroku container:release --app <name_of_api_app> web
22
heroku container:release --app <name_of_dashboard_app> web
Copied!

Setup MongoDB

Choose the MongoDB provider of your choice and obtain connection details. You will need to set the credentials for newly deployed services.
Heroku has a plenty of add-ons that allows attaching a MongoDB cluster. The recommended way is to attach a MongoDB add-on to director application and use the same credentials for API service.
All you'll need is the database name and the access credentials so you can fill the Heroku config variables as we'll see right after. So go ahead to the MongoDB Atlas docs, get your database running and grab that data!
Because the creation of this cluster is very straightforward and well-written in the docs, we'll not cover that here.

Setup Recordings Storage

Please refer to Storage Configuration instructions to configure Recordings Storage (failed tests screenshots and videos) and obtains credentials.

Setup director Service

1
# Use stateful mode and keep test results in MongoDB
2
EXECUTION_DRIVER="../execution/mongo/driver"
3
4
# Dashboard app url
5
DASHBOARD_URL=<dashboard_app_url>
6
7
# MongoDB database name
8
MONGODB_DATABASE=<atlas_database_name>
9
10
# MongoDB connection string
11
MONGODB_URI=<atlas_database_access_credentials>
12
13
# If you've set up S3 bucket for keeping screenshots
14
# Screenshots driver path
15
SCREENSHOTS_DRIVER="../screenshots/s3.driver"
16
# If you've set up minio for keeping screenshots
17
#SCREENSHOTS_DRIVER="../screenshots/minio"
18
19
# S3 Bucket name
20
S3_BUCKET="bucket_name"
21
22
# AWS region, default value is "us-east-1"
23
S3_REGION="us-east-1"
24
25
# AWS / MIIO credentials with write access to AWS S3 bucket
26
AWS_ACCESS_KEY_ID="key_id"
27
AWS_SECRET_ACCESS_KEY="secret_access"
Copied!

Setup API Service

1
# MongoDB database name
2
MONGODB_DATABASE=<atlas_database_name>
3
4
# MongoDB connection string
5
MONGODB_URI=<atlas_database_access_credentials>
Copied!

Setup Dashboard Service

1
# For communicating with API
2
GRAPHQL_SCHEMA_URL=<api_app_url>
Copied!
Reconfigure cypress agents and try running some tests. You will see test results appear in the newly installed dashboard.
Last modified 9mo ago