Add SealShare file sharing application with encryption, branding, auth, Docker, and Octane support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
4790be8142
commit
e37b322dde
@@ -0,0 +1,14 @@
|
||||
{
|
||||
frankenphp
|
||||
order php_server before file_server
|
||||
admin off
|
||||
}
|
||||
|
||||
{$SERVER_NAME:localhost} {
|
||||
root * /app/public
|
||||
encode zstd gzip
|
||||
request_body {
|
||||
max_size 4gb
|
||||
}
|
||||
php_server
|
||||
}
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd /app
|
||||
|
||||
# Generate PHP ini from environment variables (with defaults)
|
||||
echo "[dev] Configuring PHP settings..."
|
||||
cat > /usr/local/etc/php/conf.d/99-uploads.ini <<EOF
|
||||
upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE:-4G}
|
||||
post_max_size = ${PHP_POST_MAX_SIZE:-4G}
|
||||
max_execution_time = ${PHP_MAX_EXECUTION_TIME:-300}
|
||||
max_input_time = ${PHP_MAX_INPUT_TIME:-300}
|
||||
memory_limit = ${PHP_MEMORY_LIMIT:-512M}
|
||||
EOF
|
||||
|
||||
echo "[dev] Installing Node dependencies..."
|
||||
npm install 2>&1
|
||||
|
||||
echo "[dev] Building frontend assets..."
|
||||
npm run build 2>&1
|
||||
|
||||
echo "[dev] Running database migrations..."
|
||||
php artisan migrate --force
|
||||
|
||||
echo "[dev] Creating storage link..."
|
||||
php artisan storage:link --force
|
||||
|
||||
echo "[dev] Starting Octane (FrankenPHP) with --watch..."
|
||||
exec php artisan octane:frankenphp --host=0.0.0.0 --port=8000 --watch --workers=1 --max-requests=1
|
||||
@@ -0,0 +1,16 @@
|
||||
FROM dunglas/frankenphp:php8.5-alpine
|
||||
|
||||
# Install required PHP extensions
|
||||
RUN install-php-extensions \
|
||||
intl \
|
||||
pcntl
|
||||
|
||||
# Install Node.js for Vite / frontend asset building
|
||||
RUN apk add --no-cache nodejs npm
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY docker/dev-entrypoint.sh /usr/local/bin/dev-entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/dev-entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["dev-entrypoint.sh"]
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd /app
|
||||
|
||||
# Auto-generate APP_KEY if not provided
|
||||
if [ -z "$APP_KEY" ]; then
|
||||
echo "[entrypoint] No APP_KEY set, generating one..."
|
||||
APP_KEY=$(php artisan key:generate --show)
|
||||
export APP_KEY
|
||||
echo "[entrypoint] Generated APP_KEY: $APP_KEY"
|
||||
echo "[entrypoint] WARNING: Set this APP_KEY in your docker-compose.yml to persist across restarts!"
|
||||
fi
|
||||
|
||||
# Generate PHP ini from environment variables (with defaults)
|
||||
echo "[entrypoint] Configuring PHP settings..."
|
||||
cat > /usr/local/etc/php/conf.d/99-uploads.ini <<EOF
|
||||
upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE:-4G}
|
||||
post_max_size = ${PHP_POST_MAX_SIZE:-4G}
|
||||
max_execution_time = ${PHP_MAX_EXECUTION_TIME:-300}
|
||||
max_input_time = ${PHP_MAX_INPUT_TIME:-300}
|
||||
memory_limit = ${PHP_MEMORY_LIMIT:-512M}
|
||||
EOF
|
||||
|
||||
echo "[entrypoint] Running database migrations..."
|
||||
php artisan migrate --force
|
||||
|
||||
echo "[entrypoint] Creating storage link..."
|
||||
php artisan storage:link --force
|
||||
|
||||
echo "[entrypoint] Caching configuration..."
|
||||
php artisan config:cache
|
||||
php artisan route:cache
|
||||
php artisan view:cache
|
||||
|
||||
echo "[entrypoint] Starting Octane (FrankenPHP)..."
|
||||
exec php artisan octane:frankenphp --host=0.0.0.0 --port=80
|
||||
@@ -0,0 +1,9 @@
|
||||
; PHP settings for file uploads.
|
||||
; These are default values — overridden at runtime by the entrypoint
|
||||
; when PHP_UPLOAD_MAX_FILESIZE / PHP_POST_MAX_SIZE / etc. env vars are set.
|
||||
|
||||
upload_max_filesize = 4G
|
||||
post_max_size = 4G
|
||||
max_execution_time = 300
|
||||
max_input_time = 300
|
||||
memory_limit = 512M
|
||||
Reference in New Issue
Block a user