Skip to content

Commit

Permalink
Copy nginx.conf and php.ini if present (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomb1n0 authored Jun 14, 2024
1 parent 4e946be commit 5ef782d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
9 changes: 8 additions & 1 deletion resources/scripts/nginx/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ if [[ ! -z "${QA_INSTANCE}" ]]; then
fi
fi

# Detect if we have our own custom Nginx.conf to use instead
if [ -f '/var/www/.volker/nginx/nginx.conf' ]; then
echo 'Found custom Nginx configuration to apply'
cp /var/www/.volker/nginx/nginx.conf /etc/nginx/nginx.conf
echo 'Done'
fi

# Generate the Nginx configuration using the configuration script
echo 'Generating Nginx Configuration';
sh /docker-scripts/generate-config.sh > /root/app.conf
Expand All @@ -28,4 +35,4 @@ echo 'Done';
echo 'Signalling Reload to Nginx..'
nginx -s reload

echo 'Finished'
echo 'Finished'
9 changes: 9 additions & 0 deletions resources/scripts/php/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,20 @@ fi
if [ -f '/var/www/.volker/php/custom-root-script.sh' ]; then
echo 'Found custom-root-script.sh to run'
sudo -E /var/www/.volker/php/custom-root-script.sh
echo 'Done'
fi

if [ -f '/var/www/.volker/php/custom-www-script.sh' ]; then
echo 'Found custom-www-script.sh to run'
/var/www/.volker/php/custom-www-script.sh
echo 'Done'
fi

# Detect if we have our own custom php.ini to apply
if [ -f '/var/www/.volker/php/php.ini' ]; then
echo 'Found custom php.ini to apply'
sudo cp /var/www/.volker/php/php.ini /usr/local/etc/php/conf.d/zzz-php.ini
echo 'Done'
fi

echo "Running command exec $*"
Expand Down

0 comments on commit 5ef782d

Please sign in to comment.