software package profiles implemeted, job deletion optimized

This commit is contained in:
2026-09-26 13:07:23 +02:00
parent 87a5041162
commit 7d314057e4
54 changed files with 3492 additions and 342 deletions
+36 -34
View File
@@ -4,14 +4,15 @@ This guide describes a Docker image based installation and the first-start behav
## 1. Prepare the installation directory
Create a dedicated directory and the persistent data directories:
Create only a dedicated installation directory. AssetManager creates its required application subdirectories below `./data` automatically on container start:
```bash
mkdir -p /srv/docker/assetmanager
cd /srv/docker/assetmanager
mkdir -p data/config data/uploads data/logs data/backups data/scripts data/software-packages data/postgres
```
No manual creation of `data/config`, `data/uploads`, `data/logs`, `data/backups`, `data/scripts`, `data/software-packages` or `data/analyzer-profiles` is required.
Create a `.env` file. Use strong, unique values for all secrets:
```env
@@ -67,14 +68,21 @@ services:
environment:
DATABASE_URL: postgresql+psycopg://${POSTGRES_USER:-assetmanager}:${POSTGRES_PASSWORD:-change-me}@db:5432/${POSTGRES_DB:-assetmanager}
APP_TITLE: AssetManager
APP_CONFIG: /app/config/config.json
APPINFO_PATH: /app/config/APPINFO.json
BACKUP_DIR: /data/backups
ASSETMANAGER_DATA_ROOT: /assetmanager-data
APP_CONFIG: /assetmanager-data/config/config.json
APPINFO_PATH: /assetmanager-data/config/APPINFO.json
UPLOAD_DIR: /assetmanager-data/uploads
STANDARD_IMAGE_DIR: /assetmanager-data/uploads/library
BACKUP_DIR: /assetmanager-data/backups
BACKUP_INTERVAL_HOURS: ${BACKUP_INTERVAL_HOURS:-8}
BACKUP_RETENTION_DAYS: ${BACKUP_RETENTION_DAYS:-3}
MESHCENTRAL_PASSWORD: ${MESHCENTRAL_PASSWORD:-}
SYNC_LOG_DIR: /app/data/logs/sync
DIAGNOSTIC_DIR: /app/data/logs/diagnostics
APP_LOG_DIR: /assetmanager-data/logs
SYNC_LOG_DIR: /assetmanager-data/logs/sync
DIAGNOSTIC_DIR: /assetmanager-data/logs/diagnostics
SOFTWARE_PACKAGE_DIR: /assetmanager-data/software-packages
ANALYZER_PROFILE_DIR: /assetmanager-data/analyzer-profiles
SCRIPT_DIR: /assetmanager-data/scripts
LDAP_BIND_PASSWORD: ${LDAP_BIND_PASSWORD:-}
SESSION_SECRET: ${SESSION_SECRET:-}
LOCAL_ADMIN_USERNAME: ${LOCAL_ADMIN_USERNAME:-}
@@ -84,12 +92,7 @@ services:
ports:
- "${APP_PORT:-8088}:8000"
volumes:
- ./data/config:/app/config
- ./data/uploads:/app/app/static/uploads
- ./data/logs:/app/data/logs
- ./data/backups:/data/backups
- ./data/scripts:/scripts
- ./data/software-packages:/app/data/software-packages
- ./data:/assetmanager-data
callback:
image: git.jusaro.de/roland/assetmanager:${ASSETMANAGER_VERSION:-0.5.5.68}
@@ -101,8 +104,18 @@ services:
environment:
DATABASE_URL: postgresql+psycopg://${POSTGRES_USER:-assetmanager}:${POSTGRES_PASSWORD:-change-me}@db:5432/${POSTGRES_DB:-assetmanager}
APP_TITLE: AssetManager
APP_CONFIG: /app/config/config.json
APPINFO_PATH: /app/config/APPINFO.json
ASSETMANAGER_DATA_ROOT: /assetmanager-data
APP_CONFIG: /assetmanager-data/config/config.json
APPINFO_PATH: /assetmanager-data/config/APPINFO.json
UPLOAD_DIR: /assetmanager-data/uploads
STANDARD_IMAGE_DIR: /assetmanager-data/uploads/library
BACKUP_DIR: /assetmanager-data/backups
APP_LOG_DIR: /assetmanager-data/logs
SYNC_LOG_DIR: /assetmanager-data/logs/sync
DIAGNOSTIC_DIR: /assetmanager-data/logs/diagnostics
SOFTWARE_PACKAGE_DIR: /assetmanager-data/software-packages
ANALYZER_PROFILE_DIR: /assetmanager-data/analyzer-profiles
SCRIPT_DIR: /assetmanager-data/scripts
MESHCENTRAL_PASSWORD: ${MESHCENTRAL_PASSWORD:-}
LDAP_BIND_PASSWORD: ${LDAP_BIND_PASSWORD:-}
SESSION_SECRET: ${SESSION_SECRET:-}
@@ -110,8 +123,7 @@ services:
ports:
- "${CALLBACK_BIND_IP:-127.0.0.1}:${CALLBACK_PORT:-8090}:8001"
volumes:
- ./data/config:/app/config
- ./data/logs:/app/data/logs
- ./data:/assetmanager-data
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8001/api/software-callback/health', timeout=3).read()"]
interval: 30s
@@ -136,14 +148,14 @@ docker compose up -d
docker compose ps
```
On the first start, the container creates the following files only when they do not already exist:
On every start, the container verifies and creates the required application directories below `./data` when they do not already exist. On the first start it also creates:
```text
data/config/config.json
data/config/APPINFO.json
```
Existing files are preserved during subsequent container starts and updates.
Existing directories and files are preserved during subsequent container starts and updates.
## 4. Important: authentication is initially disabled
@@ -268,17 +280,7 @@ If `config.json` or `APPINFO.json` is absent, restart the application container.
### Persistent standard image library
Add the following persistent volume to the application service:
```yaml
- ./data/uploads:/app/app/static/uploads
```
Create the host directory before the first start if desired:
```bash
mkdir -p data/uploads/library
```
No additional volume or manual directory creation is required. The application container mounts the common `./data` root and creates `data/uploads/library` automatically on start.
Images uploaded through the AssetManager standard image library are stored there. You can also copy PNG, JPG/JPEG, WEBP or GIF files directly into this directory. They are then offered for selection in asset and category forms after the page is reloaded.
@@ -291,20 +293,20 @@ Reusable asset/category images are stored persistently on the Docker host in:
./data/uploads/library
```
The library is a subdirectory of the already existing uploads volume. No additional Docker mount is required. The existing Compose mapping:
The library is a subdirectory of the common persistent data root. The Compose mapping:
```text
./data/uploads -> /app/app/static/uploads
./data -> /assetmanager-data
```
therefore exposes the library as:
```text
Host: ./data/uploads/library
Container: /app/app/static/uploads/library
Container: /assetmanager-data/uploads/library
```
Images may be uploaded from the AssetManager forms or copied directly into `./data/uploads/library` on the Docker host. They remain persistent because `data/uploads` is already part of the standard AssetManager volume layout.
Images may be uploaded from the AssetManager forms or copied directly into `./data/uploads/library` on the Docker host. They remain persistent because `data/uploads` is below the standard AssetManager data root.
For image-based installations use: