Fix folder permissions

This commit is contained in:
2026-03-17 16:37:59 -03:00
parent 6f1fffd6e8
commit 72088dba9a
3 changed files with 21 additions and 2 deletions

View File

@@ -120,7 +120,7 @@ LedgerDock stores persistent runtime data in host bind mounts. By default the ho
- `${DCM_DATA_DIR:-./data}/storage` for uploaded files and app storage - `${DCM_DATA_DIR:-./data}/storage` for uploaded files and app storage
- `${DCM_DATA_DIR:-./data}/typesense-data` for the search index - `${DCM_DATA_DIR:-./data}/typesense-data` for the search index
Before first run, create storage and grant write access to container runtime user `uid=10001`: On startup, Compose runs a one-shot `storage-init` service that creates the storage tree and applies write access for the backend runtime user `uid=10001`. If you want to inspect or repair it manually, use:
```bash ```bash
mkdir -p ${DCM_DATA_DIR:-./data}/storage mkdir -p ${DCM_DATA_DIR:-./data}/storage

View File

@@ -47,7 +47,7 @@ docker compose logs -f
Compose is configured with host bind mounts for persistent data. Ensure host directories exist and are writable by the backend runtime user. Compose is configured with host bind mounts for persistent data. Ensure host directories exist and are writable by the backend runtime user.
Backend and worker run as non-root user `uid=10001` inside containers. For host-mounted storage paths: Backend and worker run as non-root user `uid=10001` inside containers. Compose bootstraps the storage bind mount through the one-shot `storage-init` service before either process starts. For manual inspection or repair of host-mounted storage paths:
```bash ```bash
mkdir -p ${DCM_DATA_DIR:-./data}/storage mkdir -p ${DCM_DATA_DIR:-./data}/storage

View File

@@ -1,4 +1,19 @@
services: services:
storage-init:
build:
context: ./backend
user: "0:0"
command:
- "sh"
- "-c"
- >
mkdir -p /data/storage/originals /data/storage/derived/previews /data/storage/tmp &&
chown -R 10001:10001 /data/storage &&
chmod -R u+rwX,g+rwX /data/storage
volumes:
- ${DCM_DATA_DIR:-./data}/storage:/data/storage
restart: "no"
db: db:
image: postgres:16-alpine image: postgres:16-alpine
environment: environment:
@@ -90,6 +105,8 @@ services:
condition: service_healthy condition: service_healthy
redis: redis:
condition: service_started condition: service_started
storage-init:
condition: service_completed_successfully
typesense: typesense:
condition: service_started condition: service_started
networks: networks:
@@ -134,6 +151,8 @@ services:
condition: service_healthy condition: service_healthy
redis: redis:
condition: service_started condition: service_started
storage-init:
condition: service_completed_successfully
typesense: typesense:
condition: service_started condition: service_started
restart: unless-stopped restart: unless-stopped