Reference repo for deploying code-server with Docker compose
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1002 B

server {
listen 80;
server_name dev.domain.tld;
return 301 https://$server_name$request_uri;
server {
add_header Strict-Transport-Security "max-age=63072000; preload";
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name dev.domain.tld;
ssl_certificate /etc/letsencrypt/live/dev.domain.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/dev.domain.tld/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
proxy_set_header Accept-Encoding gzip;
proxy_pass http://code-server:8443;