Run nginx in the foreground so that the container restarts if it fails.

This commit is contained in:
2026-07-04 11:08:39 -07:00
parent 7e997abe7b
commit 81b8c1bda4
+5 -8
View File
@@ -24,10 +24,6 @@ RUN mkdir -pv "$FDROID"
WORKDIR "$FDROID" WORKDIR "$FDROID"
RUN fdroid init RUN fdroid init
# Start Command #
CMD nginx -g "daemon off;"
# This is where the image would get published. # # This is where the image would get published. #
# Configure F-Droid Repo # # Configure F-Droid Repo #
@@ -138,7 +134,8 @@ RUN cp -rv "$FDROID" "$WEBROOT/"
# having the URL be fdroid/repo/? How do others handle this? # having the URL be fdroid/repo/? How do others handle this?
RUN cp -rv "$REPO"/* "$WEBROOT/" RUN cp -rv "$REPO"/* "$WEBROOT/"
CMD service nginx start && \ # Start Command #
echo "\n*** F-Droid repository has been started successfully! ***\n" && \
tail -F /var/log/nginx/access.log & \ CMD tail -F /var/log/nginx/access.log & \
tail -F /var/log/nginx/error.log tail -F /var/log/nginx/error.log & \
nginx -g "daemon off;"