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
Run the commands to deploy director , API and Dashboard services
# Sign into Heroku Container Registry.herokucontainer:login# Pull services imagedockerpullagoldis/sorry-cypress-director:latestdockerpullagoldis/sorry-cypress-api:latestdockerpullagoldis/sorry-cypress-dashboard:latest# Tag service images as Heroku app imagedockertagagoldis/sorry-cypress-director:latestregistry.heroku.com/<name_of_director_app>/webdockertagagoldis/sorry-cypress-api:latestregistry.heroku.com/<name_of_api_app>/webdockertagagoldis/sorry-cypress-dashboard:latestregistry.heroku.com/<name_of_dashboard_app>/web# Push the images to Heroku Container Registrydockerpushregistry.heroku.com/<name_of_director_app>/webdockerpushregistry.heroku.com/<name_of_api_app>/webdockerpushregistry.heroku.com/<name_of_dashboard_app>/web# Deploy the imageherokucontainer:release--app<name_of_director_app>webherokucontainer:release--app<name_of_api_app>webherokucontainer:release--app<name_of_dashboard_app>web
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
# Use stateful mode and keep test results in MongoDBEXECUTION_DRIVER="../execution/mongo/driver"# Dashboard app urlDASHBOARD_URL=<dashboard_app_url># MongoDB database nameMONGODB_DATABASE=<atlas_database_name># MongoDB connection stringMONGODB_URI=<atlas_database_access_credentials># If you've set up S3 bucket for keeping screenshots# Screenshots driver pathSCREENSHOTS_DRIVER="../screenshots/s3.driver"# If you've set up minio for keeping screenshots#SCREENSHOTS_DRIVER="../screenshots/minio"# S3 Bucket nameS3_BUCKET="bucket_name"# AWS region, default value is "us-east-1"S3_REGION="us-east-1"# AWS / MIIO credentials with write access to AWS S3 bucketAWS_ACCESS_KEY_ID="key_id"AWS_SECRET_ACCESS_KEY="secret_access"
Setup API Service
# MongoDB database nameMONGODB_DATABASE=<atlas_database_name># MongoDB connection stringMONGODB_URI=<atlas_database_access_credentials># Enable or disable Apollo playgroun landing pageAPOLLO_PLAYGROUND=<apollo_playground>
Setup Dashboard Service
# For communicating with APIGRAPHQL_SCHEMA_URL=<api_app_url>
Reconfigure cypress agents and try running some tests. You will see test results appear in the newly installed dashboard.