mirror of
https://github.com/Dokploy/templates.git
synced 2026-07-10 16:35:27 +02:00
The filerun/filerun image runs as user filerun (1001:1001), but /var/www/html is created as root in the image, so the named volume inherits root:root ownership. The entrypoint's first-run installer then fails to download filerun.zip into /var/www/html (Permission denied) and the container crash-loops with exit 1. - Add a busybox init service that chowns the html and user-files volumes to 1001:1001 before filerun starts (gated via service_completed_successfully). - Drop the user: "99:100" override, which is meant for pre-chowned host bind mounts in the upstream example, not named volumes. - Remove the UTF-8 BOM at the start of the file, the legacy links: entry and the obsolete version: key. Verified on a live Dokploy deploy: HTTP 200 with page title "FileRun :: Installation". Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
services:
|
|
filerun-init:
|
|
image: busybox:1.37
|
|
restart: "no"
|
|
command: chown -R 1001:1001 /var/www/html /user-files
|
|
volumes:
|
|
- filerun-html:/var/www/html
|
|
- filerun-user-files:/user-files
|
|
|
|
filerun:
|
|
image: filerun/filerun:latest
|
|
restart: unless-stopped
|
|
depends_on:
|
|
filerun-init:
|
|
condition: service_completed_successfully
|
|
db:
|
|
condition: service_started
|
|
environment:
|
|
FR_DB_HOST: db
|
|
FR_DB_PORT: 3306
|
|
FR_DB_NAME: ${MYSQL_DATABASE}
|
|
FR_DB_USER: ${MYSQL_USER}
|
|
FR_DB_PASS: ${MYSQL_PASSWORD}
|
|
volumes:
|
|
- filerun-html:/var/www/html
|
|
- filerun-user-files:/user-files
|
|
|
|
db:
|
|
image: mariadb:12.2
|
|
restart: unless-stopped
|
|
command: --old-mode=NO_PROGRESS_INFO
|
|
environment:
|
|
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
|
|
MYSQL_USER: ${MYSQL_USER}
|
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
|
|
MYSQL_DATABASE: ${MYSQL_DATABASE}
|
|
MARIADB_AUTO_UPGRADE: "1"
|
|
volumes:
|
|
- filerun-db:/var/lib/mysql
|
|
|
|
volumes:
|
|
filerun-html:
|
|
filerun-user-files:
|
|
filerun-db:
|