Improve reusability by reworking env variables, config management & docker
Closes #98
Description
The goal of this MR is to make this web application:
- easier to deploy
- easier to configure
- more reusable in different environments
Changes
- Separate docker frontend & backend containers
- Move logs outside the container (add variable VM_APP_DATA)
- Move emails and scaleway configurations into a configs directory
- Add argument to wsgi tool for launching the correct configuration (WEB_ENV not used anymore)
- Update docker scripts with new env variables management
- Separate documentation for backend, frontend and docker configurations
- Update visiomanager deploy (/merge_requests/9 in deploy repo)
How to test
- Local testing: use a backend.env file at root containing variables listed in backend/README.md or set them in shell
- Docker testing:
Assuming that all environments variables are already set in shell:
$ mkdir local
$ cp -R resources local/resources
$ export VM_APP_DATA=$`pwd`/local
$ export WEB_ENV=dev
$ ./docker/docker_build.sh visiomanager:local
$ ./docker/docker_run.sh visiomanager:local
Two containers named visiomanager-backend and visiomanager-frontend are running. You can stop the container and restart it.
Misc
- Frontend configuration is managed directly in source code (e.g., html pages, environments).
Edited by HUYNH Kim-Tam