A .env.development file must be created and populated with appropriate configuration values. Sample values in the .env.example file.
For front-end Sentry use, a front/.env.local needs creation and configuration too.
Install Docker, Docker-Compose and yarn, then
yarn run start:dev
Dev containers start with :
- Express app on port 8080
- React app on port 3000
- nginx (last React production build) on port 80
Production containers only open port 443 & 80
- Pressing Escape on the development environment will show a modal allowing to edit the contents of
req.session.user, allowing for quick user change - Adding a
local-development.jsfile inapi/configwill allow disabling calls to pe-api, resulting in less dependencies and easier development in case of partner qa environment failures. Template :
module.exports = {
bypassDeclarationDispatch: true, // disables calls to pe-api for documents
bypassDocumentsDispatch: true // disables calls to pe-api for declarations
};- update / create the
.env.qaor.env.productionfile - update / create the
./api/config/local-qa.jsor./api/config/local-production.jsfile - update / create the
./nginx/.htpasswd.qaor./nginx/.htpasswd.productionfile - create the
./nginx/entrust-zen.pole-emploi.fr-key.pemfile - run :
sh ./script/deploy.sh qaorsh ./script/deploy.sh production - connect to the server
ssh zen-createur-qaorssh zen-createur-production - go to teh correct folder
cd /home/docker/zen-createur - update docker :
sh ./script/start.sh qaorsh ./script/start.sh production
The entrust-zen.pole-emploi.fr-key.pem file must be put in the nginx folder