Help with creating staging environments

Hello support team!

I ask for your help in setting up the production and test environment for our project. Now the master branch in the repository is connected to the devs. Deploy to production can be done with the application. Our development team has a request: you can set up an automatic deployment to the production server every time you push to the master branch, and when you push to the development branch, you can deploy to the development server.


Thanks for the help!

Hi @bohdan.tyskaniuk. Thanks for your post.

Production deployments have to be done through CB Dashboard in order to make use of its functionality additional functionality, e.g. deployment logs, server logs, etc.

Please let me know if you would still like to switch the staging deployment branch.

@dmitrii.k Hi! Yes, It would be great to have a staging branch. Thanks!

@dmitrii.k for your support please ^

@dmitrii.k while making this changes can you please also set following env var:

This needs to be available at docker image build process

@radac, all build time variables have to be set inside heroku.yml - Building Docker Images with heroku.yml | Heroku Dev Center

Hello @ramzi. Actually, @Crowdbotics_Dan is the one who can change the staging deployment branch for you. Dan, please help @bohdan.tyskaniuk switch staging to deploy from the staging branch.

@Crowdbotics_Dan that would be develop branch, not staging.

I’ve updated your staging app to automatically deploy the develop branch.

@dmitrii.k @Crowdbotics_Dan can you please clone database from production to staging ? We have all of our testing entries there

Project ID: 12809

Hi @radac, I’ve copied your prod database to staging for app 12809.

Happy coding! :raised_hands:

1 Like

@dmitrii.k can you also please also copy env vars from production to staging for S3 storage.


This are the values that need to be copied.

@dmitrii.k can you please check on above. I think it will make more sens to create a new S3 instance and copy all the files to staging S3 instance.

@radac, your staging instance has AWS S3 enabled

would you like me to copy the files from production S3 to staging S3?

@dmitrii.k are you sure? we get the following error on staging regarding AWS:

An error occurred (InvalidAccessKeyId) when calling the PutObject operation: The AWS Access Key Id you provided does not exist in our records.

Also recently we have a problem with database, here is the error:

permission denied for table authtoken_token

Is there a problem with the database?

Hi @radac,

Your staging S3 credentials required a rotation. S3 should work on staging now.

The database looks to be fine. Could you re-test and provide more context?

I have sent a DM with credentials for django admin dashboard. Try to authenticate, it will trigger 500 http error and this is most likely from Postgres permission.