A .env
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
docker-compose build
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up # dev
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up # prod
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.js
file inback/config
will 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
};
The entrust-zen.pole-emploi.fr-key.pem file must be put in the nginx folder
-
add this to
/wordpress/wp-config.php
/** set the site URL */ define('WP_HOME','https://zen.pole-emploi.fr/zen-doc'); define('WP_SITEURL','https://zen.pole-emploi.fr/zen-doc'); /** Fix to get the dashboard working with the reverse proxy.*/ $_SERVER['REQUEST_URI'] = str_replace("/wp-admin/", "/zen-doc/wp-admin/", $_SERVER['REQUEST_URI']);
-
restart the wordpress container
docker restart zen_wordpress_1