Load dev env as a PHP array instead of an env file

This commit is contained in:
Alejandro Celaya
2024-10-24 09:59:13 +02:00
parent f4da9c1fcc
commit 45e108d21e
9 changed files with 84 additions and 78 deletions

View File

@@ -73,7 +73,7 @@ CMD \
if [[ ! -d "./vendor" ]]; then /usr/local/bin/composer install ; fi && \
# Download roadrunner binary
if [[ ! -f "./bin/rr" ]]; then ./vendor/bin/rr get --no-interaction --no-config --location bin/ && chmod +x bin/rr ; fi && \
# Create .env file if it does not exist yet
if [[ ! -f "./shlink-dev.env" ]]; then cp ./shlink-dev.env.dist ./shlink-dev.env ; fi && \
# Create env file if it does not exist yet
if [[ ! -f "./config/params/shlink_dev_env.php" ]]; then cp ./config/params/shlink_dev_env.php.dist ./config/params/shlink_dev_env.php ; fi && \
# Run with `exec` so that signals are properly handled
exec ./bin/rr serve --dotenv /home/shlink/shlink-dev.env -c config/roadrunner/.rr.dev.yml
exec ./bin/rr serve -c config/roadrunner/.rr.dev.yml