This project follows a branching strategy designed to separate development and production environments:
-
main branch: The primary branch used for production. Only thoroughly tested and approved code is merged here.
-
develop branch: The active development branch where new features, bug fixes, and improvements are tested. Once the code is stable, it can be merged into the
main
branch for release. -
Feature branches: All new features, fixes, or enhancements should be developed in separate branches created from
develop
. When ready, these branches are merged intodevelop
through pull requests.
- devServer:
10.147.17.58:5000
(mapped to thedevelop
branch) - prodServer:
10.147.17.58:5001
(mapped to themain
branch)
Note: Ensure you are connected to the ZeroTier before connecting to these IP's. (see discord)
Portainer monitors the docker-compose.yml
file and updates the server every 1-5 minute(s).
-
Update the Version Tag (manual):
- Change the docker version tag in the
docker-compose.yml
file. - Update the
DOCKER_TAG
indeploy-image.yml
.
- Change the docker version tag in the
-
Branch Merge:
- Merge to
develop
-> Deploy to devServer. - Merge to
main
-> Deploy to prodServer and publish a release.
- Merge to
-
Create a file named
.env
in the root directory of the project if it doesn’t already exist. -
Add the required environment variables in the format export KEY=VALUE. For example
MONGODB_CONNECTION_STRING="mongodb://localhost:27017/"
- The .env file will be automatically loaded into the application using the python-dotenv library. These variables can be accessed in the code using os.getenv()
To start the backend server, follow these steps:
-
Open the Command Line Interface (CLI): Make sure that Python is installed on your system.
-
Build the Frontend: In the CLI, execute the following command:
cd ./gui
npm i; ng build
- Run the Backend:
In the CLI (top folder NOT the
./gui
one), execute the following command:
pip install -r requirements.txt
python -u -m entrypoint
Access the OpenAPI Documentation: After the server is running, open your web browser and navigate to the following URL:
http://127.0.0.1:5000/apidocs
This will display the automatically generated API documentation for your application.