Skip to content

Commit ce778d6

Browse files
committed
fix: temporarily add back self-signed prod cert
1 parent 7c26669 commit ce778d6

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

docker/production/nginx/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
FROM nginx
22

3+
RUN apt-get update && apt-get install -y openssl
4+
RUN openssl req -x509 -newkey rsa:4096 -keyout /etc/ssl/private/localhost-cert.key -out /etc/ssl/certs/localhost-cert.pem -days 3650 -subj '/CN=localhost' -nodes
5+
36
COPY ./docker/production/nginx/default.conf /etc/nginx/conf.d/default.conf

docker/production/nginx/default.conf

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
server {
2-
listen 80 default_server;
2+
listen 443 ssl http2;
3+
listen [::]:443 ssl http2;
34
server_name _;
45

56
# Using a variable here stops nginx from crashing if the dev container is restarted or becomes otherwise unavailable
@@ -20,4 +21,14 @@ server {
2021

2122
client_max_body_size 200M;
2223
}
24+
25+
ssl_certificate /etc/ssl/certs/localhost-cert.pem;
26+
ssl_certificate_key /etc/ssl/private/localhost-cert.key;
27+
28+
ssl_session_timeout 1d;
29+
ssl_session_cache shared:MozSSL:10m;
30+
ssl_session_tickets off;
31+
32+
ssl_protocols TLSv1.3;
33+
ssl_prefer_server_ciphers off;
2334
}

0 commit comments

Comments
 (0)