further rework to the documentation
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
## Docker Queue & Horizon Setup
|
||||
|
||||
This directory bundles ready-to-use entrypoint scripts and deployment notes for running Fotospiel’s queue workers inside Docker containers. The examples assume you already run the main application in Docker (e.g. via `docker-compose.yml`) and share the same application image for workers. The shell scripts referenced below remain under `/docs/queue-supervisor/` so existing Dockerfile references stay valid.
|
||||
This directory bundles ready-to-use entrypoint scripts and deployment notes for running Fotospiel’s queue workers inside Docker containers. The examples assume you already run the main application in Docker (e.g. via `docker-compose.yml`) and share the same application image for workers. Queue entrypoints now live in `/scripts/` inside the container so every service can execute the same shell scripts.
|
||||
|
||||
### 1. Prepare the application image
|
||||
|
||||
Make sure the worker scripts are copied into the image and marked as executable:
|
||||
|
||||
```dockerfile
|
||||
# Dockerfile
|
||||
COPY docs/queue-supervisor /var/www/html/docs/queue-supervisor
|
||||
RUN chmod +x /var/www/html/docs/queue-supervisor/*.sh
|
||||
# Dockerfile (excerpt)
|
||||
COPY scripts /var/www/html/scripts
|
||||
RUN chmod +x /var/www/html/scripts/*.sh
|
||||
```
|
||||
|
||||
If you keep the project root mounted as a volume during development the `chmod` step can be skipped because the files will inherit host permissions.
|
||||
@@ -31,7 +31,7 @@ services:
|
||||
QUEUE_TRIES: 3 # optional overrides
|
||||
QUEUE_SLEEP: 3
|
||||
command: >
|
||||
/var/www/html/docs/queue-supervisor/queue-worker.sh default
|
||||
/var/www/html/scripts/queue-worker.sh default
|
||||
|
||||
media-storage-worker:
|
||||
image: fotospiel-app
|
||||
@@ -44,7 +44,7 @@ services:
|
||||
QUEUE_TRIES: 5
|
||||
QUEUE_SLEEP: 5
|
||||
command: >
|
||||
/var/www/html/docs/queue-supervisor/queue-worker.sh media-storage
|
||||
/var/www/html/scripts/queue-worker.sh media-storage
|
||||
|
||||
media-security-worker:
|
||||
image: fotospiel-app
|
||||
@@ -57,7 +57,7 @@ services:
|
||||
QUEUE_TRIES: 3
|
||||
QUEUE_SLEEP: 5
|
||||
command: >
|
||||
/var/www/html/docs/queue-supervisor/queue-worker.sh media-security
|
||||
/var/www/html/scripts/queue-worker.sh media-security
|
||||
```
|
||||
|
||||
Scale workers by increasing `deploy.replicas` (Swarm) or adding `scale` counts (Compose v2).
|
||||
@@ -79,7 +79,7 @@ services:
|
||||
APP_ENV: ${APP_ENV:-production}
|
||||
QUEUE_CONNECTION: redis
|
||||
command: >
|
||||
/var/www/html/docs/queue-supervisor/horizon.sh
|
||||
/var/www/html/scripts/horizon.sh
|
||||
```
|
||||
|
||||
Expose Horizon via your web proxy and protect it with authentication (the app already guards `/horizon` behind the super admin panel login if configured).
|
||||
|
||||
Reference in New Issue
Block a user