Skip to content

Jackson085/Software-Engineering-1

Repository files navigation

Branching Strategy

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 into develop through pull requests.

Server and Deployment

Server Details

  • devServer: 10.147.17.58:5000 (mapped to the develop branch)
  • prodServer: 10.147.17.58:5001 (mapped to the main branch)

Note: Ensure you are connected to the ZeroTier before connecting to these IP's. (see discord)

Deployment Process

Portainer monitors the docker-compose.yml file and updates the server every 1-5 minute(s).

Steps to Deploy

  1. Update the Version Tag (manual):

    • Change the docker version tag in the docker-compose.yml file.
    • Update the DOCKER_TAG in deploy-image.yml.
  2. Branch Merge:

    • Merge to develop -> Deploy to devServer.
    • Merge to main -> Deploy to prodServer and publish a release.

Environment Configuration

  1. Create a file named .env in the root directory of the project if it doesn’t already exist.

  2. Add the required environment variables in the format export KEY=VALUE. For example

MONGODB_CONNECTION_STRING="mongodb://localhost:27017/"
  1. 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()

Start the Backend

To start the backend server, follow these steps:

  1. Open the Command Line Interface (CLI): Make sure that Python is installed on your system.

  2. Build the Frontend: In the CLI, execute the following command:

cd ./gui
npm i; ng build
  1. 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published