diff --git a/.dockerignore b/.dockerignore index 5f1a9e82..110dc5e1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -12,3 +12,4 @@ !/composer.json !/composer.lock !/docker/config/* +!/docker/entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 27601122..96b81660 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,6 @@ FROM alpine:3.18.5 # Install packages RUN apk add --no-cache \ nginx \ - supervisor \ php82 \ php82-curl \ php82-mbstring \ @@ -28,8 +27,11 @@ COPY --chown=nobody /docker/config/nginx.conf /etc/nginx/nginx.conf # Copy php-fpm config COPY --chown=nobody /docker/config/fpm-pool.conf /etc/php82/php-fpm.d/www.conf -# Copy supervisord config -COPY --chown=nobody /docker/config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf +# Copy nginx config +COPY --chown=nobody /docker/config/nginx.conf /etc/nginx/nginx.conf + +# Copy entrypoint script +COPY --chown=nobody /docker/entrypoint.sh /entrypoint.sh # Copy code COPY --chown=nobody --from=composer /app/ /app @@ -44,4 +46,4 @@ RUN chown -R nobody.nobody /run /app /var/lib/nginx /var/log/nginx RUN rm -r /app/docker && rm /app/composer.* USER nobody -CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] +ENTRYPOINT ["/entrypoint.sh"] diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 1f63316b..70324b26 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -6,7 +6,7 @@ services: build: ../ environment: BVRSS_YOUTUBE_API_KEY: '' - BVRSS_SELF_URL_PATH: 'http://127.0.0.1:8080' + BVRSS_SELF_URL_PATH: 'http://127.0.0.1:8080/' BVRSS_TIMEZONE: 'Europe/London' ports: - '127.0.0.1:8080:8080' diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh new file mode 100644 index 00000000..d667f66d --- /dev/null +++ b/docker/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +php-fpm82 -D +nginx -g 'daemon off;'