Use a /nginx directory for pid because /run doesn't exist when running in kubernetes.
All checks were successful
build-staging Build build-staging has succeeded

This commit is contained in:
Tom Alexander
2026-07-16 21:38:31 -04:00
parent 833a21dbf3
commit 9401ecc0c1
2 changed files with 5 additions and 1 deletions

View File

@@ -28,6 +28,9 @@ RUN ln -s $(readlink -f /tmp/build/result/bin/sh) /tmp/sh
# Create a folder which will be copied to /tmp in the final image # Create a folder which will be copied to /tmp in the final image
RUN install -d -o root -g root -m 0777 will_be_tmp RUN install -d -o root -g root -m 0777 will_be_tmp
# Create a folder which will be copied to /nginx in the final image
RUN install -d -o 1000 -g 1000 -m 0755 will_be_slash_nginx
# #
# Runner # Runner
# #
@@ -56,6 +59,7 @@ COPY --from=builder /tmp/nix-store-closure /nix/store
COPY --from=builder /tmp/build/result /app COPY --from=builder /tmp/build/result /app
COPY --from=builder /tmp/sh /bin/sh COPY --from=builder /tmp/sh /bin/sh
COPY --from=builder /tmp/build/will_be_tmp /tmp COPY --from=builder /tmp/build/will_be_tmp /tmp
COPY --from=builder /tmp/build/will_be_slash_nginx /nginx
EXPOSE 8080 EXPOSE 8080
CMD ["/app/bin/launch_nginx"] CMD ["/app/bin/launch_nginx"]

View File

@@ -5,7 +5,7 @@ worker_processes 4;
pcre_jit on; pcre_jit on;
error_log stderr debug; error_log stderr debug;
pid /run/nginx.pid; pid /nginx/nginx.pid;
events { events {
# Connections per worker process. # Connections per worker process.