Skip to content

A self-hosted media server and file management system

fix: local port is unconfigurable in docker setup

aminnausin26dc344c1044
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 32c47984..41340173 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -11,16 +11,16 @@ services:
- ./logs/nginx:/var/log/nginx
- shared-env:/var/www/html/shared
ports:
- - '${APP_PORT:-8080}:8080'
+ - '${LOCAL_PORT:-8080}:8080'
expose:
- - '${APP_PORT:-8080}'
+ - '8080'
environment:
- - SHARED_UID=9999
- - SHARED_GID=9999
- - HEALTHCHECK_PATH=/api/health
+ - PUID=${PUID:-1000}
+ - PGID=${PGID:-1000}
+ - HEALTHCHECK_PATH=/up
restart: unless-stopped
healthcheck:
- test: curl --fail http://${APP_HOST:-app.test}:8080/api/health || exit 1
+ test: curl --fail http://${APP_HOST:-app.test}:8080/up|| exit 1
start_period: 10s
depends_on:
postgres:
diff --git a/docker/.env.docker b/docker/.env.docker
index 394743fa..94b6f821 100644
--- a/docker/.env.docker
+++ b/docker/.env.docker
@@ -1,29 +1,32 @@
#================================
-# Custom Config
+# App Config
#================================
# App Name
-# Used for session cookies — must be different from other Laravel apps on your domain
+# Used for session cookies - must be different from other Laravel apps on your domain
APP_NAME=mediaServerDemo
-# App Protocol — http OR https (Should not change)
+# App Protocol - http OR https (Should not change)
# Internally, Nginx runs without ssl and your reverse proxy handles it (caddy)
APP_SCHEME=http
-# App URL — Website will be available on https://app.test if you use Caddy,
+# App URL - Website will be available on https://app.test if you use Caddy,
# or http://app.test:8080 otherwise
APP_HOST=app.test
-# App Port — Ideally left as 8080
+# App Port - Ideally left as 8080
APP_PORT=8080
-# Websocket Port — Set to 6001 if you have connection issues
+# Local Port - The locally accessible port for your app at http://localhost:port (for reverse proxy and port forwarding)
+LOCAL_PORT=8094
+
+# Websocket Port - Set to 6001 if you have connection issues
REVERB_PORT=443
-# Websocket Protocol — Set to https if you have SSL
+# Websocket Protocol - Set to https if you have SSL
REVERB_SCHEME=https
-# App Environment — Set to `staging` or `production` for real domains
+# App Environment - Set to `staging` or `production` for real domains
APP_ENV=local
# Database connection (Docker default)
@@ -40,23 +43,31 @@ REDIS_HOST=redis
REDIS_PASSWORD=phpredis
REDIS_PORT=6379
-# Queues/Cache — Set to database if you are not running Redis (redis is not recommended for queue connections if you have low resources)
+# Queues/Cache - Set to database if you are not running Redis (redis is not recommended for queue connections if you have low resources)
QUEUE_CONNECTION=redis
CACHE_STORE=redis
-# Pulse — Set PULSE_INGEST_STORE to null if you are not using pulse and redis
+# Pulse - Set PULSE_INGEST_STORE to null if you are not using pulse and redis
PULSE_INGEST_STORE=redis
# Tweak performance (optional)
PULSE_INGEST_CHUNK=250
PULSE_INGEST_INTERVAL=5
PULSE_INGEST_TRIM_KEEP="3 days"
-# Trusted proxies — Change to proxy IPs if needed
+# Trusted proxies - Change to proxy IPs if needed
TRUSTED_PROXIES=*
-# Docker image tag — Use `latest`, `beta`, or specific tag
+# Docker image tag - Use `latest`, `beta`, or specific tag
DOCKER_RELEASE=beta
+# ================================
+# System Config
+# ================================
+
+# User/Group ID - Docker container runs and modifies files under this user (Override if your user ID is different) (check with: id -u)
+PUID=1000
+PGID=1000
+
# ================================
# Plausible Analytics (optional)
# ================================
@@ -67,7 +78,7 @@ PLAUSIBLE_SCRIPT_URL=
# Plausible domain
PLAUSIBLE_DOMAIN=
-# Plausible site ID — usually your domain
+# Plausible site ID - usually your domain
PLAUSIBLE_SITE_ID=app.test
# Plausible API token
@@ -96,6 +107,5 @@ MAIL_FROM_NAME="${APP_NAME}"
# Custom Config
# ================================
-# Login Message — Show a custom message on the login screen
+# Login Message - Show a custom message on the login screen
LOGIN_MESSAGE="This demo resets every 15 minutes.\nLogin with the following credentials.\[email protected] mediaserver"
-