feat: add SECURE_SITE environment variable to Docker Compose files

- Introduced SECURE_SITE variable in all Docker Compose files to allow configuration for reverse proxy usage.
- This addition enhances flexibility for deployment scenarios where a reverse proxy is utilized, improving security configurations.
This commit is contained in:
Daniel Luiz Alves
2025-06-30 11:53:29 -03:00
parent 9e1c6c0e9a
commit 48019df81a
5 changed files with 4 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ services:
- ENCRYPTION_KEY=change-this-key-in-production-min-32-chars # CHANGE THIS KEY FOR SECURITY
- PALMR_UID=1000 # UID for the container processes (default is 1001)
- PALMR_GID=1000 # GID for the container processes (default is 1001)
- SECURE_SITE=false # Set to true if you are using a reverse proxy
ports:
- "5487:5487" # Web port
- "3333:3333" # API port (OPTIONAL EXPOSED - ONLY IF YOU WANT TO ACCESS THE API DIRECTLY)

View File

@@ -14,6 +14,7 @@ services:
- S3_FORCE_PATH_STYLE=true # For MinIO compatibility we have to set this to true
- PALMR_UID=1000 # UID for the container processes (default is 1001)
- PALMR_GID=1000 # GID for the container processes (default is 1001)
- SECURE_SITE=false # Set to true if you are using a reverse proxy
ports:
- "5487:5487" # Web port
- "3333:3333" # API port (OPTIONAL EXPOSED - ONLY IF YOU WANT TO ACCESS THE API DIRECTLY)

View File

@@ -14,6 +14,7 @@ services:
- S3_FORCE_PATH_STYLE=false # For S3 compatibility we have to set this to false
- PALMR_UID=1000 # UID for the container processes (default is 1001)
- PALMR_GID=1000 # GID for the container processes (default is 1001)
- SECURE_SITE=false # Set to true if you are using a reverse proxy
ports:
- "5487:5487" # Web port
- "3333:3333" # API port (OPTIONAL EXPOSED - ONLY IF YOU WANT TO ACCESS THE API DIRECTLY)

View File

@@ -10,6 +10,7 @@ services:
- "3333:3333" # API port (OPTIONAL EXPOSED - ONLY IF YOU WANT TO ACCESS THE API DIRECTLY)
- PALMR_UID=1000 # UID for the container processes (default is 1001)
- PALMR_GID=1000 # GID for the container processes (default is 1001)
- SECURE_SITE=false # Set to true if you are using a reverse proxy
volumes:
- palmr_data:/app/server # Volume for the application data (changed from /data to /app/server)
restart: unless-stopped # Restart the container unless it is stopped

View File

@@ -3,7 +3,6 @@ set -e
echo "🌴 Starting Palmr Server..."
# === UID/GID Runtime Configuration ===
TARGET_UID=${PALMR_UID:-1001}
TARGET_GID=${PALMR_GID:-1001}
@@ -46,7 +45,6 @@ if [ ! -f "/app/server/prisma/palmr.db" ]; then
npx prisma db push --schema=./prisma/schema.prisma --skip-generate --force-reset
fi
# Run seed script from application directory (where node_modules is) - as target user
echo "🌱 Seeding database..."
if [ "$(id -u)" = "0" ]; then
su-exec $TARGET_UID:$TARGET_GID node ./prisma/seed.js