Skip to content

Commit

Permalink
add the possibility to configure the amount of running workers
Browse files Browse the repository at this point in the history
  • Loading branch information
mszulik committed Jan 17, 2024
1 parent 3e34136 commit 3ddcde2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ TRANSMORPHER_DISK_IMAGE_DERIVATIVES=localImageDerivatives
TRANSMORPHER_DISK_VIDEO_DERIVATIVES=localVideoDerivatives
TRANSMORPHER_SIGNING_KEYPAIR=
TRANSMORPHER_OPTIMIZER_TIMEOUT=10
LARAVEL_WORKERS_AMOUNT=1

# AWS
AWS_ACCESS_KEY_ID=
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,21 @@ To ensure backwards compatibility on automatic updates, use the following image

`cybexwebdev/transmorpher:0`

#### Configuration options

The `LARAVEL_WORKERS_AMOUNT` environment variable can be used to specify the amount of laravel workers:

```dotenv
LARAVEL_WORKERS_AMOUNT=1
```

This environment variable has to be passed to the app container in your docker-compose.yml:

```yaml
environment:
LARAVEL_WORKERS_AMOUNT: ${LARAVEL_WORKERS_AMOUNT:-1}
```
### Cloning the repository
To clone the repository and get your media server running use:
Expand Down
1 change: 1 addition & 0 deletions docker-compose.pullpreview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ services:
environment:
PULLPREVIEW: true
PULLPREVIEW_FIRST_RUN: ${PULLPREVIEW_FIRST_RUN}
LARAVEL_WORKERS_AMOUNT: ${LARAVEL_WORKERS_AMOUNT:-1}
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.${APP_CONTAINER_NAME:-transmorpher}.rule=Host(`${PULLPREVIEW_PUBLIC_DNS}`)'
Expand Down
2 changes: 1 addition & 1 deletion docker/workers.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
numprocs=1
numprocs=%(LARAVEL_WORKERS_AMOUNT)s
redirect_stderr=true
stdout_logfile=/dev/stdout
stopwaitsecs=10801

0 comments on commit 3ddcde2

Please sign in to comment.