Run container with uvicorn, move templates for packaging, add systemd config for container deployment, add OIDC_TEST_SETTINGS_FILE env var for setting, misc fixes
This commit is contained in:
parent
170e663ee8
commit
57681d91fe
12 changed files with 146 additions and 49 deletions
41
deployment/README.md
Normal file
41
deployment/README.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Deployment / installation
|
||||
|
||||
This documentation covers the specifics of Oidc-fastapi-test deployment, but
|
||||
it does no cover application configuration details,
|
||||
the set up of a public facing web server handling dns domain / https security.
|
||||
|
||||
*Oidc-fastapi-test* is shipped as containers for easy and effective installation,
|
||||
and packages to deploy them for different environments.
|
||||
|
||||
There is 1 containers:
|
||||
|
||||
- oidc-fast-test (Python server)
|
||||
|
||||
Commands below assume that they are run from their respective directories
|
||||
(`deployment/systemd`, `deployment/kubernetes`, ...).
|
||||
|
||||
## Systemd
|
||||
|
||||
With the help of *podman*, systemd can handle starting/restarting services, etc,
|
||||
even with a non-privileged user.
|
||||
|
||||
The 1 container is in the same *pod*, as it is meant primarily for a lightweight
|
||||
production environment, but this can be easily adapted.
|
||||
|
||||
The `deployment/systemd` directory contains files used for running
|
||||
*Oidc-fastapi-test* with Systemd.
|
||||
Podman is used to facilitate the creation of the relevant services.
|
||||
|
||||
### Deployment
|
||||
|
||||
```sh
|
||||
cp -r * $HOME/.config/containers/systemd/
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user start oidc-fastapi-test-pod.service
|
||||
```
|
||||
|
||||
Note that starting on system boot requires the user to be enabled accordingly with:
|
||||
|
||||
```sh
|
||||
sudo loginctl enable-linger <username>
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue