coder: initial import of deployed stack (v2.35.3 compose, docker template, SSOT vault)
This commit is contained in:
78
deploy/code.nginx.conf
Normal file
78
deploy/code.nginx.conf
Normal file
@@ -0,0 +1,78 @@
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name code.loca.zone;
|
||||
|
||||
include snippets/security-headers-app.conf;
|
||||
client_max_body_size 128m;
|
||||
|
||||
# No Authelia gate on purpose. Coder owns identity; workspace agents and the
|
||||
# `coder` CLI authenticate with bearer tokens, not the authelia_session
|
||||
# cookie, so an auth_request gate would break agent connectivity.
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:52226;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_buffering off;
|
||||
proxy_read_timeout 86400;
|
||||
}
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/code.loca.zone/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/code.loca.zone/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name wiki.code.loca.zone;
|
||||
|
||||
include snippets/security-headers.conf;
|
||||
root /home/loca/dev/wikis/code/current;
|
||||
index index.html;
|
||||
|
||||
location ~* \.(css|js|png|webp|ico|json|woff2?|svg|map)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri.html $uri/ =404;
|
||||
}
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/code.loca.zone/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/code.loca.zone/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name code.loca.zone;
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/html;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name wiki.code.loca.zone;
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/html;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user