feat: vaultwarden! Communication via host!
This commit is contained in:
parent
2707c7d0ee
commit
bf79d2bfab
8 changed files with 99 additions and 18 deletions
|
|
@ -16,6 +16,8 @@ services:
|
|||
- /home/hane/pihanepi/config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro,Z
|
||||
- /home/hane/pihanepi/config/nginx/fastcgi_params:/etc/nginx/fastcgi_params:ro,Z
|
||||
- /home/hane/pihanepi/config/nginx/fastcgi.conf:/etc/nginx/fastcgi.conf:ro,Z
|
||||
# We also create and map a certs folder for TLS
|
||||
- /home/hane/pihanepi/config/nginx/certs:/etc/nginx/certs/
|
||||
|
||||
# Logs folder
|
||||
- /home/hane/pihanepi/datamount/nginx/log:/var/log/nginx:Z
|
||||
|
|
|
|||
38
compose/vault/compose.yaml
Normal file
38
compose/vault/compose.yaml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
|
||||
services:
|
||||
nginx:
|
||||
name: vaultmirror
|
||||
#image: hane-dokuwiki-image:dokuwiki-fixed-volume
|
||||
image: vaultwarden/server:latest-alpine
|
||||
build: ./
|
||||
volumes:
|
||||
# Data store
|
||||
- /home/hane/pihanepi/datamount/vault/data:/data
|
||||
|
||||
# Logs folder
|
||||
#- /home/hane/pihanepi/datamount/nginx/log:/var/log/nginx:Z
|
||||
#- ./apache2.conf:/etc/apache2/apache2.conf
|
||||
#- type: bind
|
||||
# source: ./001-wiki.conf
|
||||
# target: /etc/apache2/sites-enabled/001-wiki.conf
|
||||
#- ./init.sh:/init.sh
|
||||
#- ${WIKI_DATA:-/path/to/data}:/var/www/dokuwiki
|
||||
ports:
|
||||
- "8000:80/tcp"
|
||||
#- "8080:80/udp"
|
||||
#- "44345:443/tcp"
|
||||
#- "44344:443/udp"
|
||||
#entrypoint: /init.sh
|
||||
#entrypoint: bash
|
||||
stdin_open: true # docker run -i
|
||||
tty: true # docker run -t
|
||||
|
||||
#volumes:
|
||||
# dokuwiki:
|
||||
# external: true
|
||||
# labels:
|
||||
# - "dev.roboces.wiki=Dokuwiki volume"
|
||||
# name: dokuwiki
|
||||
|
||||
|
||||
|
||||
2
config/nginx/certs/.gitignore
vendored
Normal file
2
config/nginx/certs/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
*.pem
|
||||
*.key
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#user nobody;
|
||||
worker_processes 1;
|
||||
|
||||
|
|
@ -8,7 +7,6 @@ worker_processes 1;
|
|||
|
||||
#pid logs/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
|
@ -32,13 +30,29 @@ http {
|
|||
|
||||
#gzip on;
|
||||
|
||||
upstream vaultwarden-default {
|
||||
zone vaultwarden-default 64k;
|
||||
server 192.168.1.45:8000;
|
||||
keepalive 2;
|
||||
}
|
||||
|
||||
# Needed to support websocket connections
|
||||
# See: https://nginx.org/en/docs/http/websocket.html
|
||||
# Instead of "close" as stated in the above link we send an empty value.
|
||||
# Else all keepalive connections will not work.
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' "";
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
#access_log logs/host.access.log main;
|
||||
|
||||
location / {
|
||||
location / {
|
||||
rewrite ^/test(.*)$ / break;
|
||||
root /var/www;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
|
@ -93,23 +107,31 @@ http {
|
|||
|
||||
# HTTPS server
|
||||
#
|
||||
#server {
|
||||
# listen 443 ssl;
|
||||
# server_name localhost;
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name localhost 192.168.1.45 internal.test;
|
||||
|
||||
# ssl_certificate cert.pem;
|
||||
# ssl_certificate_key cert.key;
|
||||
ssl_certificate /etc/nginx/certs/CERTS.pem;
|
||||
ssl_certificate_key /etc/nginx/certs/KEY.pem;
|
||||
#cert.key
|
||||
|
||||
# ssl_session_cache shared:SSL:1m;
|
||||
# ssl_session_timeout 5m;
|
||||
ssl_session_cache shared:SSL:1m;
|
||||
ssl_session_timeout 5m;
|
||||
|
||||
# ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
# ssl_prefer_server_ciphers on;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
ssl_prefer_server_ciphers on;
|
||||
rewrite ^/test(.*)$ / break;
|
||||
|
||||
# location / {
|
||||
# root html;
|
||||
# index index.html index.htm;
|
||||
# }
|
||||
#}
|
||||
|
||||
#location /test {
|
||||
# rewrite ^/test(.*)$ / break;
|
||||
# root /var/www;
|
||||
# index index.html index.htm;
|
||||
#}
|
||||
|
||||
location / {
|
||||
proxy_pass http://vaultwarden-default;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
1
config/vault/compose.yaml
Normal file
1
config/vault/compose.yaml
Normal file
|
|
@ -0,0 +1 @@
|
|||
|
||||
2
datamount/nginx/log/.gitignore
vendored
Normal file
2
datamount/nginx/log/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
||||
2
datamount/vault/.gitignore
vendored
Normal file
2
datamount/vault/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
||||
12
rules-save
Normal file
12
rules-save
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Generated by iptables-save v1.8.11 (nf_tables) on Wed May 20 21:29:27 2026
|
||||
*nat
|
||||
:PREROUTING ACCEPT [0:0]
|
||||
:INPUT ACCEPT [0:0]
|
||||
:OUTPUT ACCEPT [1:128]
|
||||
:POSTROUTING ACCEPT [0:0]
|
||||
[0:0] -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
|
||||
[0:0] -A PREROUTING -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 44344
|
||||
[0:0] -A OUTPUT -o lo -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
|
||||
[0:0] -A OUTPUT -o lo -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 44344
|
||||
COMMIT
|
||||
# Completed on Wed May 20 21:29:27 2026
|
||||
Loading…
Add table
Add a link
Reference in a new issue