Self-hosted identity provider for SSO on all services
Find a file
Lukas Gysin 87c000926b
feat: Version Bump
Signed-off-by: Lukas Gysin <L.Gysin@pm.me>
2026-04-30 18:41:37 +02:00
.env.example feat: Version controll docker tags 2026-02-10 22:03:51 +01:00
.gitignore feat: Exclude database backups 2026-02-10 22:40:11 +01:00
CODE_OF_CONDUCT docs: Add docs from template 2026-02-10 21:59:47 +01:00
docker-compose.yaml feat: Version Bump 2026-04-30 18:41:37 +02:00
LICENSE docs: Add docs from template 2026-02-10 21:59:47 +01:00
README.md docs: Correct docker volume 2026-02-10 22:40:28 +01:00

Identity Provider

Self-hosted identity provider for SSO on all services

Getting Started

These instructions will give you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Requirements for the software and other tools to build, test and push

Supported IDEs

You can use the IDE of your choice to continue developing the project. However, the following IDEs are recommended and officially supported:

Secret Management

Sensitive data is stored in a .env file. An empty example of the structure can be found in .env.example

Development

This repository is a full functional docker compose application stack. Therefore, you can use the terminal to deploy a development instance on your local machine.

docker-compose up -d

Deployment Preperation

For the first deployment, some preconditions have to be met:

  • Make sure the public network exists in docker
  • Make sure the $PATH directory on the server exists

Deployment

For the deployment, the docker compose stack must be copied to the server and started

ssh $USER@$SERVER "docker compose -f $PATH/docker-compose.yaml down"
scp .env $USER@$SERVER:/$PATH/
scp docker-compose.yaml $USER@$SERVER:/$PATH/
ssh $USER@$SERVER "docker compose -f $PATH/docker-compose.yaml up -d"

The $USER variable holds the username of the user on the server.
The $SERVER variable holds the IP-address or the domain of the server.
The $PATH variable holds the absolut path to the application folder on the server.

Database Update

When updateing postgres to a new major version, some internals change. For a major upgrade the database has to be backuped and resored on the new version.

docker compose down
docker compose up -d database
docker compose exec -T database pg_dumpall -U $DB_USER > ./database-upgrade/dump.sql
docker compose down
docker run --rm -v identity_data:/source -v ./database-upgrade:/backup alpine tar -czf /backup/volume-backup.tar.gz -C /source .
docker run --rm -v identity_data:/data alpine rm -rf /data
# Update the postgres database to the new major version
docker compose up -d database
cat ./database-upgrade/dump.sql | docker compose exec -T database psql $DB_DATABASE -U $DB_USER
docker compose up -d

Restore

If something goes wrong, with the following script the data from the backup can be restored.

docker compose down
docker run --rm -v identity_data:/data alpine rm -rf /data
docker run --rm -v identity_data:/target -v ./database-upgrade:/backup alpine sh -c "cd /target && tar -xzf /backup/volume-backup.tar.gz"
# Restore the old database version
docker compose up -d

Authors

License

This project is licensed under the MIT License

Acknowledgments