mirror of
https://github.com/Dokploy/templates.git
synced 2026-07-10 00:15:28 +02:00
fix: chown named volumes so the non-root filerun user can install on first run
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>
This commit is contained in:
@@ -1,14 +1,20 @@
|
||||
version: "3.8"
|
||||
|
||||
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
|
||||
user: "99:100"
|
||||
depends_on:
|
||||
- db
|
||||
links:
|
||||
- db:db
|
||||
filerun-init:
|
||||
condition: service_completed_successfully
|
||||
db:
|
||||
condition: service_started
|
||||
environment:
|
||||
FR_DB_HOST: db
|
||||
FR_DB_PORT: 3306
|
||||
|
||||
Reference in New Issue
Block a user