This is how I got Gramps-web running on my local TrueNAS Scale server.
Its essentially a workaround until we have a official TrueNAS or Truecharts app for Gramps.
I’m not that familiar with docker compose or kubernetes. But i found a guide how to use Portainer to make it work without having to build a custom kubernetes/helm chart. Thanks to Constantin.FF most of this guide is from his more general development purpose [Guide] Building and Running Custom Docker Applications on TrueNAS SCALE | TrueNAS Community
Prerequisites
- Have the TrueCharts apps catalog set up. Getting Started with TrueCharts | TrueCharts
- Create a dataset for Portainer in one off your pools (
/mnt/pool-1/portainer/data
). - (Optional) If you plan to use your own domain for your apps (
portainer.example.com
,gramps.example.com
)- Install Traefik, cert-manager and clusterissuer, Installing Traefik | TrueCharts , clusterissuer Setup Guide | TrueCharts
Step 1: Installing Portainer
The default Portainer install only provides access to the Kubernetes cluster. To gain access to Docker as well, follow these steps:
- Mount the docker.sock into the container to access Docker directly
[Additional App Storage]
Type of Storage: Host Path
Host Path: /var/run/docker.sock
Mount Path: /var/run/docker.sock
- Change “runAsGroup” to get access to docker
[Security Context]
runAsGroup: 999 (the "docker" group on SCALE).
- For proper project cloning and running in Portainer some additional settings are required.
The actual discussion for this issue is here: https://github.com/orgs/portainer/discussions/9795
[Extra Args]
--data=/mnt/pool-1/portainer/data
[Additional App Storage]
Type of Storage: Host Path
Host Path: /mnt/pool-1/portainer/data
Mount Path: /mnt/pool-1/portainer/data
Step 2: Adding Docker Sock in Portainer
The default Portainer install only provides access to the Kubernetes cluster. To gain access to Docker as well, follow these steps:
- Log into the Portainer instance.
- Upon the first run, you’ll be prompted to add the “local” Kubernetes cluster. Proceed with it.
- Navigate to
Environments
→+ Add Environment
- Choose
Docker Standalone
and selectStart Wizard
- Select
Socket
, then provide a name for the environment.
Step 3: Adding Gramps-web stack in Portainer
- Fetch the latest
docker-compose.yml
from Deploy with Docker - Gramps Web - From the Home screen, select your Docker environment.
- Access Stacks and click
+ Add Stack
- Choose
Web editor
and paste the contents ofdocker-compose.yml
. - Change the host
ports
from"80:5000" # host:docker
to value that is not in use for something else in your Truenas. e.g"15570:5000" # host:docker
- Configure settings and environment variables based on your requirements. e.g. set
GUNICORN_NUM_WORKERS: "2"
- Deploy the stack
- Test that its accessible on the ip address of your TrueNAS server e.g. http://192.168.1.2:15557
Step 4: (Optional) To access the Gramps-web via Traefik on your domain
The optional prerequisites are required. TrueNAS Web GUI via Traefik | TrueCharts
- Install
external-service
app - Set
External Service IP
to the ip address of your TrueNAS server - Set
Port Type
toHTTP
- Set
Service Port
to the same value as hostports
in the Portainer stackWeb editor
in step 3 (default 80
). - Setup Ingress set the
Host
andHostName
values to e.g.gramps.example.com
andclusterIssuer
To do:
- Better storage of Gramps data its now stored in
ix-applications/docker/volumes