Skip to content

IFS4205-TraceIT/research-backend

Repository files navigation

Research django web backend Research Backend CI SAST

Setting up for local development

Do view the settings file in research_backend/settings.py to modify any settings before starting.

  1. Ensure you have the following installed:

    • Python: 3.10 or above
    • Docker: 20.10.18 or above
    • Docker Compose: 2.10.2 or above
  2. Setup the required services using the docker-compose.yml file:

    docker-compose up
  3. Installing dependencies:

    1. Install poetry on your machine: https://python-poetry.org/
    2. Run poetry install to install the required dependencies.
  4. Set and export the required environment variables:

    export DJANGO_SECRET_KEY="test" \
        DJANGO_DEBUG="True" \
        VAULT_ADDR="http://127.0.0.1:8200" \
        VAULT_TOKEN="dev-only-token" \
        POSTGRES_HOST="127.0.0.1" \
        POSTGRES_AUTH_HOST="127.0.0.1" \
        POSTGRES_RESEARCH_HOST="127.0.0.1" \
        POSTGRES_PORT="5432" \
        POSTGRES_AUTH_PORT="5432" \
        POSTGRES_RESEARCH_PORT="5432" \
        POSTGRES_DB="test1" \
        POSTGRES_RESEARCH_DB="test2" \
        POSTGRES_AUTH_DB="test3" \
        POSTGRES_USER="test" \
        POSTGRES_RESEARCH_USER="test" \
        POSTGRES_AUTH_USER="test" \
        POSTGRES_PASSWORD="test" \
        POSTGRES_RESEARCH_PASSWORD="test" \
        POSTGRES_AUTH_PASSWORD="test" \
        POSTGRES_SUPER_USER="test" \
        POSTGRES_SUPER_PASSWORD="test"
  5. Run poetry run python manage.py makemigrations and poetry run python manage.py migrate to migrate the database.

  6. Run poetry run python manage.py runserver to start the server.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •