⚙️ Set up and run BACKEND
In this section we will cover:
- How to set up the proyect
- Deploy docker containers for development and production
🛠 Set up the proyect
1. Enter backend directory
2. Launch Backend dependencies using Docker
This will launch all required dependencies such as MongoDB database for local development
- More on Docker in Docker docs.
3. Get or create .env
file under `Backend/
Development ready enviroment is provided at Backend/docker/
. Copy and rename it to .env
using the following command:
- Check upstream development environment file
- More on environments in environment docs.
4. Install the virtual environment and dependencies
🪟 Windows
cd Backend/;
python -m venv venv;
venv/Scripts/activate;
pip install -r requirements.txt;
pip install -r requirements-dev.txt;
pip install -r requirements-test.txt;
🐧 Linux
cd Backend/ &&
python3.11 -m venv venv &&
source venv/bin/activate &&
pip install -r requirements.txt &&
pip install -r requirements-dev.txt &&
pip install -r requirements-test.txt
install-all-requirements.sh
that install all dependencies from a given directory in an already create virtual environment (Folder has to be named venv
). Works both for Windows and Linux.
5. Run the app:
- App will be launched at http://127.0.0.1:8000/
- Swagger docs will be launched at http://127.0.0.1:8000/docs
Standar with hot reload
This will automatically reload the app if changes are made.
Debug
Launch the app in debug mode using DEBUG Backend app
at VSCODE debug section. Breakpoints selected in code will be triggered.