From 6f3917907efd1fb29b2461c54765f8d14e16ac92 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 12 Nov 2025 12:28:47 +1100 Subject: [PATCH] update docs --- DOCKER_SETUP.md | 36 ++++++++++++++---------------------- docker-compose.yml | 11 ++++++----- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/DOCKER_SETUP.md b/DOCKER_SETUP.md index d413bcb8d..e6d2e942b 100644 --- a/DOCKER_SETUP.md +++ b/DOCKER_SETUP.md @@ -16,22 +16,29 @@ This setup uses `serversideup/php:8.4-fpm-nginx` as the base image and is design ``` 2. **Update `.env` with your configuration:** - - Set `APP_KEY` (generate with: `docker compose run --rm pixelfed php artisan key:generate --show`) + - Set `APP_KEY` ( generate with https://laravel-encryption-key-generator.vercel.app/ ) - Update `APP_URL`, `APP_DOMAIN`, `ADMIN_DOMAIN`, `SESSION_DOMAIN` with your domain - Set secure database passwords for `DB_PASSWORD` and `DB_ROOT_PASSWORD` - Configure mail settings -3. **Build and start the containers:** +3. **Build container** + ```bash + docker compose build + ``` + +4. **Build and start the containers:** ```bash docker compose up -d ``` -4. **Generate application key (if not done in step 2):** +5. **Generate application key (if not done in step 2):** ```bash - docker compose exec pixelfed php artisan key:generate + docker compose exec pixelfed php artisan instance:actor + docker compose exec pixelfed php artisan import:cities + docker compose exec pixelfed php artisan passport:keys ``` -5. **Create admin user:** +6. **Create admin user:** ```bash docker compose exec pixelfed php artisan user:create ``` @@ -77,26 +84,11 @@ server { } ``` -## Services - -- **pixelfed:** Main application (port 8080) -- **db:** MariaDB 11 database -- **redis:** Redis cache and queue backend -- **horizon:** Laravel Horizon queue worker -- **scheduler:** Laravel task scheduler (runs scheduled tasks every minute) - -## Volumes - -- `db-data`: Database persistence -- `redis-data`: Redis persistence -- `./storage`: Application storage (uploads, cache, logs) -- `./bootstrap/cache`: Laravel bootstrap cache - ## Useful Commands ```bash # View logs -docker compose logs -f pixelfed +docker compose logs -f # Run artisan commands docker compose exec pixelfed php artisan [command] @@ -147,4 +139,4 @@ docker compose exec pixelfed php artisan view:clear ### Database Connection Issues - Verify database credentials in `.env` - Check if database container is running: `docker compose ps` -- View database logs: `docker compose logs db` +- View database logs: `docker compose logs -f db` diff --git a/docker-compose.yml b/docker-compose.yml index 7716049ef..a1fada840 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,8 +10,10 @@ services: env_file: - .env environment: + # SSL Configuration (handled by reverse proxy) + SSL_MODE: "off" + # PHP Configuration - AUTORUN_LARAVEL_MIGRATION_ISOLATION: "true" PHP_POST_MAX_SIZE: "500M" PHP_UPLOAD_MAX_FILE_SIZE: "500M" PHP_OPCACHE_ENABLE: "1" @@ -19,14 +21,13 @@ services: # Laravel Auto-run Configuration AUTORUN_ENABLED: "true" AUTORUN_LARAVEL_MIGRATION: "true" + AUTORUN_LARAVEL_MIGRATION_ISOLATION: "true" AUTORUN_LARAVEL_STORAGE_LINK: "true" AUTORUN_LARAVEL_EVENT_CACHE: "true" AUTORUN_LARAVEL_ROUTE_CACHE: "true" AUTORUN_LARAVEL_VIEW_CACHE: "true" - AUTORUN_LARAVEL_CONFIG_CACHE: "true" - - # SSL Configuration (handled by reverse proxy) - SSL_MODE: "off" + AUTORUN_LARAVEL_CONFIG_CACHE: "true" + volumes: - ./storage:/var/www/html/storage - ./bootstrap/cache:/var/www/html/bootstrap/cache