From e2a270e027bc2e770ef44f7e31ea62a9994dc9ed Mon Sep 17 00:00:00 2001 From: Derek Cooper Date: Thu, 20 Aug 2026 00:05:51 -0700 Subject: [PATCH] added solidinvoice --- Solidinvoice/.env.example | 28 +++++++++++++ Solidinvoice/docker-compose-nfs.yaml | 63 ++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 Solidinvoice/.env.example create mode 100644 Solidinvoice/docker-compose-nfs.yaml diff --git a/Solidinvoice/.env.example b/Solidinvoice/.env.example new file mode 100644 index 0000000..ecbbaf7 --- /dev/null +++ b/Solidinvoice/.env.example @@ -0,0 +1,28 @@ +# Solidinvoice Docker Compose - Environment Variables + +# Docker image tag to use for Solidinvoice. Defaults to "latest" if not set. +SOLIDINVOICE_VERSION=latest + +# Host port to expose the Solidinvoice web UI on. Maps to container port 8765. +SOLIDINVOICE_PORT=8765 + +# Postgres major version to use for the database container. +SOLIDINVOICE_POSTGRES_VERSION=16 + +# Postgres database name, username, and password. +# Enter these same values into the Solidinvoice setup wizard on first run +# (Solidinvoice has no env vars of its own for DB config - it's set via the web UI). +SOLIDINVOICE_DB_NAME=solidinvoice +SOLIDINVOICE_DB_USERNAME=solidinvoice +SOLIDINVOICE_DB_PASSWORD=changeme + +# IP address or hostname of the NFS server used for both volumes. +SOLIDINVOICE_NFS_SERVER=192.168.1.100 + +# NFS export path for the Solidinvoice app config volume (/etc/solidinvoice). +# Example: :/mnt/pool/solidinvoice/app +SOLIDINVOICE_APP_NFS_DEVICE=:/mnt/pool/solidinvoice/app + +# NFS export path for the Postgres data volume. +# Example: :/mnt/pool/solidinvoice/db +SOLIDINVOICE_DB_NFS_DEVICE=:/mnt/pool/solidinvoice/db diff --git a/Solidinvoice/docker-compose-nfs.yaml b/Solidinvoice/docker-compose-nfs.yaml new file mode 100644 index 0000000..e7eab9f --- /dev/null +++ b/Solidinvoice/docker-compose-nfs.yaml @@ -0,0 +1,63 @@ +services: + app: + image: solidinvoice/solidinvoice:${SOLIDINVOICE_VERSION:-latest} + container_name: solidinvoice-app + security_opt: + - no-new-privileges:true + volumes: + - solidinvoice-app:/etc/solidinvoice:rw + ports: + - ${SOLIDINVOICE_PORT:-8765}:8765 + depends_on: + db: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -z 127.0.0.1 8765 || exit 1"] + interval: 10s + timeout: 5s + retries: 3 + start_period: 90s + deploy: + resources: + limits: + memory: 512M + restart: unless-stopped + + db: + image: postgres:${SOLIDINVOICE_POSTGRES_VERSION:-16} + container_name: solidinvoice-db + security_opt: + - no-new-privileges:true + environment: + POSTGRES_DB: ${SOLIDINVOICE_DB_NAME:-solidinvoice} + POSTGRES_USER: ${SOLIDINVOICE_DB_USERNAME:-solidinvoice} + POSTGRES_PASSWORD: ${SOLIDINVOICE_DB_PASSWORD} + volumes: + - solidinvoice-db:/var/lib/postgresql/data:rw + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${SOLIDINVOICE_DB_USERNAME:-solidinvoice} -d ${SOLIDINVOICE_DB_NAME:-solidinvoice}"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s + deploy: + resources: + limits: + memory: 512M + restart: unless-stopped + +volumes: + solidinvoice-app: + name: solidinvoice-app + driver: local + driver_opts: + type: nfs + o: "addr=${SOLIDINVOICE_NFS_SERVER},rw,noatime,rsize=65536,wsize=65536,timeo=600,nfsvers=4" + device: "${SOLIDINVOICE_APP_NFS_DEVICE}" + solidinvoice-db: + name: solidinvoice-db + driver: local + driver_opts: + type: nfs + o: "addr=${SOLIDINVOICE_NFS_SERVER},rw,hard,noatime,rsize=65536,wsize=65536,timeo=600,nfsvers=4" + device: "${SOLIDINVOICE_DB_NFS_DEVICE}" \ No newline at end of file