mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Define default values for env vars used in rr prod config
This commit is contained in:
@@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
|
|||||||
|
|
||||||
### Fixed
|
### 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.
|
* [#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
|
## [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'
|
command: 'php -dopcache.enable_cli=1 -dopcache.validate_timestamps=0 ../../bin/roadrunner-worker.php'
|
||||||
|
|
||||||
http:
|
http:
|
||||||
address: '0.0.0.0:${PORT}'
|
address: '0.0.0.0:${PORT:-8080}'
|
||||||
middleware: ['static']
|
middleware: ['static']
|
||||||
static:
|
static:
|
||||||
dir: '../../public'
|
dir: '../../public'
|
||||||
forbid: ['.php', '.htaccess']
|
forbid: ['.php', '.htaccess']
|
||||||
pool:
|
pool:
|
||||||
num_workers: ${WEB_WORKER_NUM}
|
num_workers: ${WEB_WORKER_NUM:-0}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
timeout: 300 # 5 minutes
|
timeout: 300 # 5 minutes
|
||||||
pool:
|
pool:
|
||||||
num_workers: ${TASK_WORKER_NUM}
|
num_workers: ${TASK_WORKER_NUM:-0}
|
||||||
consume: ['shlink']
|
consume: ['shlink']
|
||||||
pipelines:
|
pipelines:
|
||||||
shlink:
|
shlink:
|
||||||
|
|||||||
@@ -20,14 +20,6 @@ if [ "${ENABLE_PERIODIC_VISIT_LOCATE}" = "true" ] && [ "${SHLINK_USER_ID}" = "ro
|
|||||||
/usr/sbin/crond &
|
/usr/sbin/crond &
|
||||||
fi
|
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
|
if [ "$SHLINK_RUNTIME" == 'openswoole' ]; then
|
||||||
# When restarting the container, openswoole might think it is already in execution
|
# 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
|
# This forces the app to be started every second until the exit code is 0
|
||||||
|
|||||||
Reference in New Issue
Block a user