Skip to content

Commit

Permalink
fix(gateway): avoid override of dhparam when volume is used for certi…
Browse files Browse the repository at this point in the history
…ficates
  • Loading branch information
henrybarreto committed Aug 27, 2024
1 parent 4714d18 commit 67c17f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions gateway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ FROM base AS development

COPY --from=openresty/openresty:1.25.3.1-5-alpine-apk /usr/local/openresty /usr/local/openresty

RUN mkdir /etc/shellhub-gateway

RUN mkdir -p /var/run/openresty /etc/letsencrypt && \
curl -sSL https://ssl-config.mozilla.org/ffdhe2048.txt -o /etc/letsencrypt/dhparam.pem
curl -sSL https://ssl-config.mozilla.org/ffdhe2048.txt -o /etc/shellhub-gateway/dhparam.pem

RUN apk add --update openssl build-base
RUN go install github.com/markbates/[email protected] && \
Expand All @@ -59,8 +61,10 @@ RUN apk add libgcc curl certbot certbot-nginx

COPY --from=openresty/openresty:1.25.3.1-5-alpine-apk /usr/local/openresty /usr/local/openresty

RUN mkdir /etc/shellhub-gateway

RUN mkdir -p /var/run/openresty /etc/letsencrypt && \
curl -sSL https://ssl-config.mozilla.org/ffdhe2048.txt -o /etc/letsencrypt/dhparam.pem
curl -sSL https://ssl-config.mozilla.org/ffdhe2048.txt -o /etc/shellhub-gateway/dhparam.pem

COPY --from=builder /go/src/github.com/shellhub-io/shellhub/gateway/gateway /gateway

Expand Down
2 changes: 1 addition & 1 deletion gateway/nginx/conf.d/shellhub.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ server {
ssl_session_timeout 10m;
ssl_session_tickets off;

ssl_dhparam /etc/letsencrypt/dhparam.pem;
ssl_dhparam /etc/shellhub-gateway/dhparam.pem;

ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers off;
Expand Down

0 comments on commit 67c17f1

Please sign in to comment.