- Config: auth, services, logging, queue and database only repeated the
framework's own files and are gone; the others keep only the keys that
differ (app version, cache serializable_classes, session cookie name,
Markdown mail theme, the shares disk, three Octane values, Livewire's
pagination theme and payload guards).
- Email verification is removed: User never implemented MustVerifyEmail,
so it was never enforced, and SealShare has a single admin and no
registration. CreateNewUser goes with it.
- FileEncryptionService::encryptFile() and generateSalt() were only used
by tests; tests build files with encryptTestFile() in tests/Pest.php.
- The expiration options are defined once, as Share::EXPIRATIONS. "30 Days"
now lasts 30 days instead of a calendar month, and Admin settings only
save a default expiration that is one of the options.
- One-caller helpers are inlined, the uploader reads chunk responses with
XHR's responseType, and starter-kit leftovers are removed.
- Docker: PHP reads the PHP_* limits from the environment itself
(${VAR:-default} in uploads.ini); both entrypoints stop writing the ini.
docker-compose.yml shares the app and scheduler variables through one
anchor. The dev image installs gd for the screenshot publisher and fake
test images.
- Development runs in Docker only: the composer dev script, concurrently,
laravel/pail, laravel/sail, autoprefixer and the shell-quote override
are gone.
- phpunit.xml forces the test environment with <server> entries, so tests
run in the dev container no longer use its real database.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
77 lines
2.3 KiB
YAML
77 lines
2.3 KiB
YAML
# What the app and the scheduler both need
|
|
x-environment: &environment
|
|
APP_KEY: ${APP_KEY:?Set APP_KEY in .env or environment}
|
|
APP_URL: ${APP_URL:-http://localhost}
|
|
APP_ENV: ${APP_ENV:-production}
|
|
APP_DEBUG: ${APP_DEBUG:-false}
|
|
DB_CONNECTION: ${DB_CONNECTION:-sqlite}
|
|
DB_HOST: ${DB_HOST:-}
|
|
DB_PORT: ${DB_PORT:-}
|
|
DB_DATABASE: ${DB_DATABASE:-/app/database/sqlite/database.sqlite}
|
|
DB_USERNAME: ${DB_USERNAME:-}
|
|
DB_PASSWORD: ${DB_PASSWORD:-}
|
|
LOG_CHANNEL: ${LOG_CHANNEL:-stderr}
|
|
LOG_LEVEL: ${LOG_LEVEL:-warning}
|
|
|
|
services:
|
|
app:
|
|
image: gitea.nonameweb.ch/nonameweb/sealshare:latest
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
- "443:443/udp"
|
|
volumes:
|
|
- sealshare_storage:/app/storage/app
|
|
- sealshare_database:/app/database/sqlite
|
|
- caddy_data:/data
|
|
- caddy_config:/config
|
|
environment:
|
|
<<: *environment
|
|
AUTO_HTTPS: ${AUTO_HTTPS:-false}
|
|
SERVER_NAME: ${SERVER_NAME:-localhost}
|
|
SESSION_DRIVER: ${SESSION_DRIVER:-database}
|
|
QUEUE_CONNECTION: ${QUEUE_CONNECTION:-database}
|
|
CACHE_STORE: ${CACHE_STORE:-database}
|
|
OCTANE_HTTPS: ${OCTANE_HTTPS:-false}
|
|
OCTANE_MAX_EXECUTION_TIME: ${OCTANE_MAX_EXECUTION_TIME:-300}
|
|
UPLOAD_CHUNK_SIZE_MB: ${UPLOAD_CHUNK_SIZE_MB:-16}
|
|
PHP_UPLOAD_MAX_FILESIZE: ${PHP_UPLOAD_MAX_FILESIZE:-64M}
|
|
PHP_POST_MAX_SIZE: ${PHP_POST_MAX_SIZE:-64M}
|
|
PHP_MAX_EXECUTION_TIME: ${PHP_MAX_EXECUTION_TIME:-300}
|
|
PHP_MAX_INPUT_TIME: ${PHP_MAX_INPUT_TIME:-300}
|
|
PHP_MEMORY_LIMIT: ${PHP_MEMORY_LIMIT:-512M}
|
|
healthcheck:
|
|
test: ["CMD", "/app/docker/healthcheck.sh"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
start_period: 10s
|
|
retries: 3
|
|
|
|
scheduler:
|
|
image: gitea.nonameweb.ch/nonameweb/sealshare:latest
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
entrypoint: ["php", "artisan", "schedule:work"]
|
|
# The image's healthcheck asks the web server, which only the app service runs
|
|
healthcheck:
|
|
disable: true
|
|
volumes:
|
|
- sealshare_storage:/app/storage/app
|
|
- sealshare_database:/app/database/sqlite
|
|
environment: *environment
|
|
depends_on:
|
|
app:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
sealshare_storage:
|
|
sealshare_database:
|
|
caddy_data:
|
|
caddy_config:
|