From 01da52efbb00702a4bb50a26e77b4f85d136f830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Corr=C3=AAa=20Gomes?= Date: Sun, 18 Jun 2023 12:58:39 -0400 Subject: [PATCH 1/2] Improving entrypoint.sh to run services in foreground --- web/entrypoint.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/web/entrypoint.sh b/web/entrypoint.sh index 7177e6b98..f4744d1ef 100755 --- a/web/entrypoint.sh +++ b/web/entrypoint.sh @@ -10,10 +10,8 @@ cd /app echo "Running database migrations..." php artisan migrate --force -echo "Starting nginx server..." -openrc -touch /run/openrc/softlevel -rc-service nginx start - echo "Starting PHP server..." -php-fpm +php-fpm & + +echo "Starting nginx server..." +nginx -g 'daemon off;' From b7bb4632412ec75462c2417f0dfbc1e99a988f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Corr=C3=AAa=20Gomes?= Date: Fri, 23 Jun 2023 13:19:41 -0400 Subject: [PATCH 2/2] Docker > Running the compilation in background --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bfc989512..93aeea551 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,4 +25,4 @@ RUN chown www-data:www-data /app/storage/db.sqlite RUN cd frontend && npm install && npm run build RUN composer build -ENTRYPOINT [ "/app/entrypoint.sh" ] +CMD [ "/app/entrypoint.sh" ]