mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-16 15:29:54 +03:00
Define default values for env vars used in rr prod config
This commit is contained in:
parent
7cff11080d
commit
e50c21440f
3 changed files with 4 additions and 11 deletions
|
@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
|
|||
|
||||
### Fixed
|
||||
* [#1413](https://github.com/shlinkio/shlink/issues/1413) Fix error when creating initial DB in Postgres in a cluster where a default `postgres` db does not exist or the credentials do not grant permissions to connect.
|
||||
* [#1803](https://github.com/shlinkio/shlink/issues/1803) Fix default RoadRunner port when not using docker image.
|
||||
|
||||
|
||||
## [3.6.0] - 2023-05-24
|
||||
|
|
|
@ -7,18 +7,18 @@ server:
|
|||
command: 'php -dopcache.enable_cli=1 -dopcache.validate_timestamps=0 ../../bin/roadrunner-worker.php'
|
||||
|
||||
http:
|
||||
address: '0.0.0.0:${PORT}'
|
||||
address: '0.0.0.0:${PORT:-8080}'
|
||||
middleware: ['static']
|
||||
static:
|
||||
dir: '../../public'
|
||||
forbid: ['.php', '.htaccess']
|
||||
pool:
|
||||
num_workers: ${WEB_WORKER_NUM}
|
||||
num_workers: ${WEB_WORKER_NUM:-0}
|
||||
|
||||
jobs:
|
||||
timeout: 300 # 5 minutes
|
||||
pool:
|
||||
num_workers: ${TASK_WORKER_NUM}
|
||||
num_workers: ${TASK_WORKER_NUM:-0}
|
||||
consume: ['shlink']
|
||||
pipelines:
|
||||
shlink:
|
||||
|
|
|
@ -20,14 +20,6 @@ if [ "${ENABLE_PERIODIC_VISIT_LOCATE}" = "true" ] && [ "${SHLINK_USER_ID}" = "ro
|
|||
/usr/sbin/crond &
|
||||
fi
|
||||
|
||||
# RoadRunner config needs these to have been set, so falling back to default values if not set yet
|
||||
if [ "$SHLINK_RUNTIME" == 'rr' ]; then
|
||||
export PORT="${PORT:-"8080"}"
|
||||
# Default to 0 so that RoadRunner decides the number of workers based on the amount of logical CPUs
|
||||
export WEB_WORKER_NUM="${WEB_WORKER_NUM:-"0"}"
|
||||
export TASK_WORKER_NUM="${TASK_WORKER_NUM:-"0"}"
|
||||
fi
|
||||
|
||||
if [ "$SHLINK_RUNTIME" == 'openswoole' ]; then
|
||||
# When restarting the container, openswoole might think it is already in execution
|
||||
# This forces the app to be started every second until the exit code is 0
|
||||
|
|
Loading…
Add table
Reference in a new issue