13 lines
630 B
Bash
Executable File
13 lines
630 B
Bash
Executable File
#!/bin/sh
|
|
# Run on the Docker/Unraid host before creating the two containers from XML.
|
|
set -eu
|
|
TASK_STATE_ROOT=${TRAVIOREL_STATE_ROOT:-/mnt/user/appdata/traviorel}
|
|
mkdir -p "$TASK_STATE_ROOT/state" "$TASK_STATE_ROOT/secrets"
|
|
chown 10001:999 "$TASK_STATE_ROOT/state"
|
|
chmod 755 "$TASK_STATE_ROOT/state"
|
|
docker network inspect traviorel-net >/dev/null 2>&1 || docker network create traviorel-net
|
|
docker run --rm --user 0 --entrypoint python \
|
|
-e DB_CFFI_TOKEN_FILE=/run/traviorel-secrets/db_cffi_token \
|
|
-v "$TASK_STATE_ROOT/secrets:/run/traviorel-secrets" \
|
|
ghcr.io/lesecuritae/traviorel-app:latest /app/init_db_cffi_token.py
|