- Install Docker Engine (https://docs.docker.com/engine/install/)
- Install Docker Compose (https://docs.docker.com/compose/install/)
- Add your user to the docker group:
sudo usermod -aG docker $(whoami)
- Rename
env.template
to.env
- Change the following variables:
- POSTGRESDBUSER/POSTGRESPASSWORD - superuser that will be created for postgres
- APIUSERNAME/APIPASSWORD - service account that will created for Slussen
- If you use Syna:
- SYNAIP - your whitelisted IP at Syna
- SYNAUSER/SYNACUSTOMERNUMBER - your login at Syna
- If you use Creditsafe (TODO)
- FASTAPIUSER/FASTAPIPASSWORD - service account to access fastAPI.
- FASTAPIBASEURL - URL for fastAPI (usually ends in /v1/api/)
- BACKENDURL -
- USESSL - if true, will use https for frontend and backen. You need a certificate (.crt and .key files).
- NGINXCONFDIR - a directory where nginx.conf will be placed, full or relative to where deployment.sh and subsequently docker-compose is run.
- NGINXSSLDIR - a directory where you place certificate.crt and certificate.key, full or relative to where deployment.sh and subsequently docker-compose is run.
- NGINXDOMAIN - the domain name matchning your certificate
- BACKENDURL - https://NXGINXDOMAIN/backend (or http://localhost/backend if USESSL is false)
- GITHUBUSER - the user account used to retrieve docker images (see below)
- Get a personal login token with read:packages access from your github account, save it in token.txt (https://github.com/settings/tokens)
- Run deployment script
sh ./deployment.sh
- Access the service at https://NGINXDOMAIN or (http://localhost if USESSL is false)
- cd to the installation directory (where ./deployment.sh was run)
- Get the latest version of the docker images:
docker-compose pull
(no need to stop running containers) - Update the stack:
docker-compose up -d