cdsr: initial import of deployed stack (runtime 4.133.0, pinned extensions, SSOT vault)
This commit is contained in:
76
deploy/cdsr.nginx.conf
Normal file
76
deploy/cdsr.nginx.conf
Normal file
@@ -0,0 +1,76 @@
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name cdsr.loca.zone;
|
||||
|
||||
include snippets/security-headers-app.conf;
|
||||
include snippets/authelia-location.conf;
|
||||
client_max_body_size 512m;
|
||||
|
||||
location / {
|
||||
include snippets/authelia-authrequest.conf;
|
||||
proxy_pass http://127.0.0.1:52224;
|
||||
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_read_timeout 86400;
|
||||
}
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/cdsr.loca.zone/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/cdsr.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.cdsr.loca.zone;
|
||||
|
||||
include snippets/security-headers.conf;
|
||||
root /home/loca/dev/wikis/cdsr/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/cdsr.loca.zone/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/cdsr.loca.zone/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name cdsr.loca.zone;
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/html;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name wiki.cdsr.loca.zone;
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/html;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
26
deploy/cdsr.service
Normal file
26
deploy/cdsr.service
Normal file
@@ -0,0 +1,26 @@
|
||||
[Unit]
|
||||
Description=code-server IDE for loca.zone (cdsr)
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=loca
|
||||
Group=loca
|
||||
WorkingDirectory=/home/loca/dev/code-server
|
||||
Environment=HOME=/home/loca
|
||||
Environment=PATH=/home/loca/.local/bin:/home/loca/.bun/bin:/usr/local/bin:/usr/bin:/bin
|
||||
ExecStart=/usr/bin/code-server --config /home/loca/dev/code-server/config/config.yaml
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
TimeoutStopSec=20
|
||||
# Bound the extension host on a shared box: swap was ~97% consumed before this
|
||||
# stack existed, so an unbounded editor can degrade every co-tenant service
|
||||
# before the kernel OOM-killer intervenes. Deliberately no NoNewPrivileges or
|
||||
# ProtectSystem: the documented workflow stages root-owned files with sudo from
|
||||
# the integrated terminal.
|
||||
MemoryHigh=8G
|
||||
MemoryMax=12G
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user