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