Staging Server
๐ Address: https://dev.nantral-platform.fr
1. Why a staging server?โ
The purpose of the staging server is to test dangerous modifications before deploying them on the production server.
๐ค When should I use the staging server?โ
- When you update the database (for example creating new migrations or updating
the
models.pyfiles) - When you add new dependencies to the project (
pyproject.tomlorpackage.json) - More generally, when you are not sure about your code and want to test it!
๐ค What can I test on the staging server?โ
You can test:
- all modifications of the backend (Python code)
- all modifications of the frontend (Javascript code)
- all modifications of the email templates
- the
Dockerfile(only theproductionimage)
You cannot test:
- the documentation website
- the periodic celery tasks (scheduled tasks)
- the docker configuration (
docker-compose*.yml,stack/*.yml) - the deployment scripts (database backup, deployment, etc.)
- the github actions
2. How to test my code on the staging serverโ
info
First, try to run your code on your machine with docker. If the code does not work there, it won't work on the server either.
Prerequisite: your code should be pushed on GitHub on a specific branch.
For our example, let's call this branch my-feature-branch.
- In GitHub, on the Nantral Platform repository, go to the Actions tab and then select the Deploy Staging action: https://github.com/3cn-ecn/nantralPlatform/actions/workflows/deploy-staging.yml
- Click the Run workflow button and select your branch (
my-feature-branch) - Click the button Run workflow to confirm and start the deployment!

Note
The deployment can take up from 5 to 10 minutes. If you push new changes to the branch, you need to relaunch the Github Action to deploy the new changes.