Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update nginx #202

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile-dalton
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ COPY engine-configs /opt/dalton/engine-configs
STOPSIGNAL SIGINT
EXPOSE 8080

CMD python /opt/dalton/run.py -c /opt/dalton/dalton.conf
CMD ["python", "/opt/dalton/run.py", "-c", "/opt/dalton/dalton.conf"]
10 changes: 4 additions & 6 deletions Dockerfile-nginx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# spin up nginx with custom conf
FROM nginx:1.19.4
MAINTAINER David Wharton
FROM nginx:1.27.2

ARG DALTON_EXTERNAL_PORT
ARG DALTON_EXTERNAL_PORT_SSL
ARG DALTON_EXTERNAL_PORT=80
ARG DALTON_EXTERNAL_PORT_SSL=443

RUN rm /etc/nginx/nginx.conf && rm -rf /etc/nginx/conf.d
COPY nginx-conf/nginx.conf /etc/nginx/nginx.conf
Expand All @@ -13,6 +12,5 @@ COPY nginx-conf/tls /etc/nginx/tls
# adjust nginx config so redirects point to external port(s).
# order of sed operations matters since one replaced string is a subset of the other.
RUN sed -i 's/REPLACE_AT_DOCKER_BUILD_SSL/'"${DALTON_EXTERNAL_PORT_SSL}"'/' /etc/nginx/conf.d/dalton.conf
# hadolint ignore=DL3059
RUN sed -i 's/REPLACE_AT_DOCKER_BUILD/'"${DALTON_EXTERNAL_PORT}"'/' /etc/nginx/conf.d/dalton.conf

CMD nginx
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ lint:
fix:
.venv/bin/ruff format
.venv/bin/ruff check --fix

hadolint: Dockerfile-dalton Dockerfile-nginx
docker run -t --rm -v `pwd`:/app -w /app hadolint/hadolint /bin/hadolint $^
1 change: 0 additions & 1 deletion nginx-conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
daemon off;

events {
worker_connections 1024;
Expand Down
Loading