Skip to content

adfinis/mySAGW

Folders and files

NameName
Last commit message
Last commit date
Dec 16, 2024
Nov 5, 2024
Mar 12, 2025
Aug 10, 2022
Feb 3, 2025
Feb 3, 2025
Sep 23, 2024
May 6, 2021
Jan 7, 2021
May 19, 2022
Apr 1, 2021
Oct 30, 2024
Oct 18, 2023
Dec 20, 2024
Jan 8, 2021
Nov 18, 2024
Dec 20, 2024
Nov 1, 2024
Dec 16, 2024
Nov 18, 2024
Nov 18, 2024
Mar 12, 2025
Jan 31, 2025

Repository files navigation

mySAGW

Build Status Coverage Ruff License: GPL-3.0-or-later

Application management for SAGW

Getting started

Installation (dev)

Requirements

  • docker
  • docker-compose

After installing and configuring those, download docker-compose.yml and run the following command:

echo "UID=$(id -u)" > .env
touch ./caluma/.env
docker-compose up -d

Wait for the database migrations to complete for the API and Caluma.

Load the config data into Caluma:

make caluma-loadconfig

Import the Keycloak config:

docker-compose exec keycloak /opt/keycloak/bin/kc.sh import --override true --file /opt/keycloak/data/import/test-config.json

Add mysagw.local to /etc/hosts:

echo "127.0.0.1 mysagw.local" | sudo tee -a /etc/hosts

You can now access the application under the following URIs:

The default users are:

Username Password Used for
admin keycloak keycloak admin
admin@example.com mysagw apps
staff@example.com mysagw apps
user@example.com mysagw apps

Configuration

mySAGW is a 12factor app which means that configuration is stored in environment variables. Different environment variable types are explained at django-environ.

Deployment

cp -r ./.envs/.production.example ./.envs/.production

Then edit the files under ./.envs/.production/ to your needs.

For the staging environment, copy to ./.envs/.staging/.

echo -e "UID=$(id -u)\nCOMPOSE_FILE=docker-compose.yml:docker-compose.prod.yml" > .env
# on staging environments:
# echo -e "UID=$(id -u)\nCOMPOSE_FILE=docker-compose.yml:docker-compose.staging.yml" > .env
# Also in .env file, set OIDC_HOST variable
docker compose up -d
# Wait for the database migrations to complete for the API and Caluma.
make caluma-loadconfig
# upload the templates to DMS
docker compose run --rm api python manage.py upload_template identity-labels.docx \
    accounting-cover.docx acknowledgement-de.docx acknowledgement-fr.docx \
    acknowledgement-en.docx credit-approval-de.docx credit-approval-fr.docx \
    credit-approval-en.docx application.docx

Contributing

Look at our contributing guidelines to start with your first contribution.