Skip to content

Commit 16f46c8

Browse files
committed
fix(https-server): use envs
1 parent b51a51c commit 16f46c8

4 files changed

Lines changed: 33 additions & 31 deletions

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
FROM nginx:1.27-alpine3.21-perl
22

3-
COPY deployments/prod/https-server/nginx.conf.template /etc/nginx/templates/nginx.conf.template
3+
COPY deployments/prod/https-server/nginx.conf /etc/nginx/nginx.conf
4+
COPY deployments/prod/https-server/backend.conf.template /etc/nginx/templates
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
listen 443 ssl;
2+
server ${DOMAIN};
3+
4+
ssl_certificate /etc/letsencrypt/live/${DOMAIN}/fullchain.pem;
5+
ssl_certificate_key /etc/letsencrypt/live/${DOMAIN}/privkey.pem;
6+
ssl_certificate_cache max=1000 inactive=20s valid=1m;
7+
8+
ssl_session_cache shared:SSL:1m;
9+
10+
location / {
11+
proxy_pass http://backend:8000;
12+
proxy_http_version 1.1;
13+
proxy_set_header Upgrade $http_upgrade;
14+
proxy_set_header Connection $connection_upgrade;
15+
16+
proxy_read_timeout 86400;
17+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
events {
2+
worker_connections 1024;
3+
}
4+
5+
http {
6+
map $http_upgrade $connection_upgrade {
7+
default upgrade;
8+
'' close;
9+
}
10+
11+
server {
12+
include /etc/nginx/conf.d/*.conf;
13+
}
14+
}

deployments/prod/https-server/nginx.conf.template

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)