init
This commit is contained in:
commit
b15b95781c
108 changed files with 14802 additions and 0 deletions
23
deploy/Caddyfile.example
Normal file
23
deploy/Caddyfile.example
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
updates.example.com {
|
||||
encode gzip zstd
|
||||
|
||||
request_body {
|
||||
max_size 1GB
|
||||
}
|
||||
|
||||
# Optional: restrict the admin UI to VPN or office IP ranges.
|
||||
# @admin path /admin /admin/*
|
||||
# handle @admin {
|
||||
# @blocked not remote_ip 10.0.0.0/8 192.168.0.0/16 100.64.0.0/10
|
||||
# respond @blocked "admin access denied" 403
|
||||
# reverse_proxy 127.0.0.1:8080
|
||||
# }
|
||||
|
||||
reverse_proxy 127.0.0.1:8080 {
|
||||
header_up Host {host}
|
||||
header_up X-Forwarded-For {remote_host}
|
||||
header_up X-Forwarded-Host {host}
|
||||
header_up X-Forwarded-Proto {scheme}
|
||||
}
|
||||
}
|
||||
|
||||
42
deploy/nginx.update-server.conf.example
Normal file
42
deploy/nginx.update-server.conf.example
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name updates.example.com;
|
||||
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name updates.example.com;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/updates.example.com/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/updates.example.com/privkey.pem;
|
||||
|
||||
client_max_body_size 1g;
|
||||
proxy_read_timeout 65s;
|
||||
proxy_send_timeout 65s;
|
||||
|
||||
# Optional: restrict the admin UI to VPN or office IP ranges.
|
||||
# location /admin/ {
|
||||
# allow 10.0.0.0/8;
|
||||
# allow 192.168.0.0/16;
|
||||
# allow 100.64.0.0/10;
|
||||
# deny all;
|
||||
#
|
||||
# proxy_pass http://127.0.0.1:8080;
|
||||
# include /etc/nginx/snippets/update-server-proxy.conf;
|
||||
# }
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
proxy_http_version 1.1;
|
||||
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-Host $host;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
}
|
||||
}
|
||||
|
||||
17
deploy/update-server.env.example
Normal file
17
deploy/update-server.env.example
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
APP_BASE_URL=https://updates.example.com
|
||||
ADMIN_EMAIL=admin@example.com
|
||||
ADMIN_PASSWORD=change-this-before-production
|
||||
APP_LOG_LEVEL=INFO
|
||||
|
||||
# The app stores session tokens in SQLite, so there is no separate SESSION_SECRET
|
||||
# in the current architecture.
|
||||
APP_READ_TIMEOUT=30s
|
||||
APP_READ_HEADER_TIMEOUT=5s
|
||||
APP_WRITE_TIMEOUT=60s
|
||||
APP_IDLE_TIMEOUT=120s
|
||||
APP_MAX_HEADER_BYTES=1048576
|
||||
APP_LOGIN_RATE_LIMIT_PER_MINUTE=10
|
||||
APP_LOGIN_RATE_LIMIT_BURST=5
|
||||
APP_CLIENT_RATE_LIMIT_PER_MINUTE=120
|
||||
APP_CLIENT_RATE_LIMIT_BURST=60
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue