add garage admin api with token, expose via garage.hantim.net
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
RPC_SECRET=hantim-garage-rpc-secret
|
||||
ARGENTO_NODE_ID=hantim-garage-argento-node-id
|
||||
ADMIN_TOKEN=hantim-garage-admin-token
|
||||
|
||||
@@ -22,3 +22,4 @@ index = "index.html"
|
||||
|
||||
[admin]
|
||||
api_bind_addr = "[::]:3903"
|
||||
admin_token = "${ADMIN_TOKEN}"
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# Garage admin API
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name garage.hantim.net;
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/certbot;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://garage.hantim.net$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
http2 on;
|
||||
server_name garage.hantim.net;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/garage.hantim.net/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/garage.hantim.net/privkey.pem;
|
||||
|
||||
add_header Strict-Transport-Security "max-age=63072000; preload" always;
|
||||
|
||||
location / {
|
||||
proxy_pass http://garage:3903;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user