diff --git a/Dockerfile b/Dockerfile index 331ee75..8518e28 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,8 @@ FROM alpine:3.23.2 # The koel version to download ARG KOEL_VERSION_REF=v8.3.0 +ENV PHP_INI_DIR=/usr/local/etc/php + # Install dependencies RUN apk add --no-cache --no-interactive \ curl \ @@ -67,7 +69,7 @@ COPY apache/httpd.conf /etc/apache2/ COPY apache/www.conf /etc/php84/php-fpm.d/ # Copy php.ini -COPY ./php.ini "$PHP_INI_DIR/php.ini" +COPY ./php.ini ${PHP_INI_DIR}/php.ini # make crontab file RUN touch /etc/crontabs/www-data diff --git a/koel-init b/koel-init index f9b859c..3d9e78e 100755 --- a/koel-init +++ b/koel-init @@ -1,15 +1,14 @@ #!/bin/sh -if [[ ! -f /var/www/html/.env ]]; then +if [ ! -f /var/www/html/.env ]; then echo "No .env file found in /var/www/html. Make sure to mount a .env file to store the configuration. You can use the koel:init command (see https://github.com/koel/docker#the-koelinit-command) for a guided setup." echo "" echo "See https://github.com/koel/koel/blob/master/.env.example for an example .env file." - exit 0 fi -if [[ -z "${SKIP_INIT}" ]]; then - if [[ -z "${OPTIMIZE_CONFIG}" ]]; then - echo "Config not optimized. You can optimize the config with `OPTIMIZE_CONFIG`. Note that this will prevent config modifications from being applied until the container is restarted." +if [ -z "${SKIP_INIT}" ]; then + if [ -z "${OPTIMIZE_CONFIG}" ]; then + echo "Config not optimized. You can optimize the config with 'OPTIMIZE_CONFIG'. Note that this will prevent config modifications from being applied until the container is restarted." else echo "Optimizing config..." # clear before caching, in case this is a container reboot and it was already cached from before @@ -22,4 +21,4 @@ if [[ -z "${SKIP_INIT}" ]]; then php artisan koel:init --no-assets --no-interaction else echo "Initialization skipped. koel might not work properly if it is misconfigured or if the database is out of date. This should not be used outside of debugging or manual initial setups!" -fi \ No newline at end of file +fi