Use of `Docker` ============== ## General comment As said in the introduction, this project makes use of `docker` and `docker-compose`. Their are several `Dockerfile` spraid across the project that creates the required `docker` image. Then the `docker-compose.yml` file coordinates everything: environment variables, ports, volumes, etc. You can have a look at those files for more comments. ## Use in Gitlab The `backend` image is also stored on [https://gitlab.utc.fr/rex-dri/rex-dri/container_registry](https://gitlab.utc.fr/rex-dri/rex-dri/container_registry) to be easily used in `Gitlab CI`. As it seemed not possible to do the same for the `frontend` image due to the fact that the `node_modules` folder couldn't be kept during `CI`, the image is basically regenerated in `CI`. When ran locally, the `npm i` command (installing the `Node` dependencies) is run everytime with `make up` to make sure your `node_modules` folder is up to date. ## Updating the image on Gitlab If you are not connected to the registry yet, do it: ```bash docker login registry.gitlab.utc.fr ``` To update the images stored on the Gitlab repository, run for instance: ```bash docker build ./backend --compress --tag registry.gitlab.utc.fr/rex-dri/rex-dri/backend:latest ``` And push it: ```bash docker push registry.gitlab.utc.fr/rex-dri/rex-dri/backend:latest ``` ## Updating the images from Gitlab To do so, run `make docker-pull`. ## Issues with `__pycache__` If you have issues at some point with `__pycache__` files, you can delete them: ```bash find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | sudo xargs rm -rf ```