From e7b29d38c0111026b30b1c335e515b097a1279d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Drunen?= Date: Mon, 30 Oct 2023 02:30:15 +0100 Subject: [PATCH] Move files used for Docker into dedicated directory --- docker-compose.yml | 4 +++- Dockerfile => docker/Dockerfile | 9 +++------ cron.conf => docker/cron.conf | 0 entrypoint.sh => docker/entrypoint.sh | 2 +- nginx.conf => docker/nginx.conf | 0 supervisord.conf => docker/supervisord.conf | 0 6 files changed, 7 insertions(+), 8 deletions(-) rename Dockerfile => docker/Dockerfile (81%) rename cron.conf => docker/cron.conf (100%) rename entrypoint.sh => docker/entrypoint.sh (81%) rename nginx.conf => docker/nginx.conf (100%) rename supervisord.conf => docker/supervisord.conf (100%) diff --git a/docker-compose.yml b/docker-compose.yml index 9e0ead96..91f519d4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,7 +21,9 @@ services: retries: 5 app: - build: ./ + build: + context: . + dockerfile: docker/Dockerfile depends_on: database: condition: service_healthy diff --git a/Dockerfile b/docker/Dockerfile similarity index 81% rename from Dockerfile rename to docker/Dockerfile index a83d0b00..5bd6bb5c 100644 --- a/Dockerfile +++ b/docker/Dockerfile @@ -12,13 +12,10 @@ RUN apt-get update && \ supervisor # Configure NGINX -COPY nginx.conf /etc/nginx/sites-enabled/default +COPY docker/nginx.conf /etc/nginx/sites-enabled/default # Configure cron -COPY cron.conf /etc/cron.d/budget - -# Configure Supervisor -COPY supervisord.conf /etc/supervisor/conf.d/budget.conf +COPY docker/cron.conf /etc/cron.d/budget # Install PHP extensions RUN install-php-extensions pdo_mysql zip calendar gd @@ -45,4 +42,4 @@ RUN php artisan storage:link RUN chown -R www-data:www-data /var/www -ENTRYPOINT ["/var/www/entrypoint.sh"] +ENTRYPOINT ["/var/www/docker/entrypoint.sh"] diff --git a/cron.conf b/docker/cron.conf similarity index 100% rename from cron.conf rename to docker/cron.conf diff --git a/entrypoint.sh b/docker/entrypoint.sh similarity index 81% rename from entrypoint.sh rename to docker/entrypoint.sh index b99c9661..37218864 100755 --- a/entrypoint.sh +++ b/docker/entrypoint.sh @@ -10,6 +10,6 @@ php artisan config:cache php artisan migrate --force -supervisord -n -c supervisord.conf +supervisord -n -c docker/supervisord.conf exec "$@" diff --git a/nginx.conf b/docker/nginx.conf similarity index 100% rename from nginx.conf rename to docker/nginx.conf diff --git a/supervisord.conf b/docker/supervisord.conf similarity index 100% rename from supervisord.conf rename to docker/supervisord.conf