.gitignore | ||
compose.yml | ||
LICENSE | ||
Makefile | ||
nginx.prod.conf | ||
README.md | ||
sample.env |
InvenTree Deployment
These are the deployment files required to get InvenTree up and running. InvenTree is deployed as a docker compose
setup and therefore has the following dependencies:
- Podman/Docker
- Docker Compose
- Make (as script runner)
Configuration
Copy the sample.env
into a file named .env
and make sure to adapt all values to your needs, especially secrets. Note that the redis cache is disabled by default.
Installation
In order to run invoke an update or complete the first setup, the data folder must be created (mkdir data
) and make update
is used to pull the latest images and apply all database migrations.
make update
involves the command docker compose run --rm inventree-server invoke update
which is performs the initial database setup.
To create an admin account, the command docker compose run inventree-server invoke superuser
can be run.
The command make up
can be used to run the setup as a foreground service, make "up -d"
can be used to run the setup in detached mode.
Warning:
When running inside LXC (e.g. Proxmox) with ZFS you might need to run add the following to your /etc/docker/daemon.json
(and restart afterwards):
{
"storage-driver": "vfs"
}
This can be required because Docker does not like ZFS and might have issues to store some layers. Note that using VFS has significant impact on the storage usage (might explode).
SSO
The following is an example on configuring SSO using OIDC and Keycloak as IdP. See the InvenTree SSO docs as well as the AllAuth social providers for more details. Note that Keycloak is not a valid provider anymore and OIDC should be used.
Keycloak
- Create a new client (Type: OpenID Connect)
- Enable Client authentication, Authorization, Standard flow. Disable everything else (explicitly Direct access grant)
- Set home URL to
https://<inventree-hostname>
and Redirect URL tohttps://<inventree-hostname>/accounts/oidc/login/callback/
.
Inventree
Login as InvenTree admin user and open the admin interface.
- In the Admin interface, add a new group named "default" and click on "Save and edit". Disallow reading the admin settings and allow all other permissions you want a default user to have.
- In the
Social Accounts
block, add a new Social Application. The provider must be oidc, the name and client id can be arbitrary value. The available default site must be added. - Go back to the application. Under
Settings > Login Settings
make sure toEnable SSO
andEnable SSO registration
. Also, setGroup on signup
to your default group.