Initial commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
ARG BASE_REPO="repo.nstart.local/"
|
||||
FROM ${BASE_REPO}library/nginx:1.29.1-alpine
|
||||
|
||||
LABEL org.opencontainers.image.title="VaultWarden proxy" \
|
||||
org.opencontainers.image.description="NGINX VaultWarden proxy."
|
||||
|
||||
COPY vaultwarden.conf /etc/nginx/conf.d/
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=3s CMD nginx -t || exit 1
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
@@ -0,0 +1,33 @@
|
||||
upstream vaultwarden_upstream {
|
||||
server vaultwarden-server:80;
|
||||
keepalive 2;
|
||||
}
|
||||
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' "";
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8080;
|
||||
server_name _;
|
||||
|
||||
client_max_body_size 525M;
|
||||
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-Proto $scheme;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
|
||||
location /admin {
|
||||
allow 172.30.0.0/24;
|
||||
deny all;
|
||||
proxy_pass http://vaultwarden_upstream;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://vaultwarden_upstream;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user