created vaultwarden

This commit is contained in:
2026-05-24 01:01:51 -07:00
parent c16adc4c38
commit 0e4ae0df6a
2 changed files with 56 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
# Vaultwarden Docker Compose Environment Variables
# Image version tag (default: latest)
VAULTWARDEN_VERSION=latest
# Public URL Vaultwarden is served from — required for web vault and some features to work (e.g. https://vault.example.com)
VAULTWARDEN_DOMAIN=
# Admin panel token — leave empty to disable the admin panel
# Must be a bcrypt hash, not plain text. Generate with:
# echo -n "your-password" | htpasswd -niBC 10 "" | tr -d ':\n'
VAULTWARDEN_ADMIN_TOKEN=
# Allow new user registrations (default: false — disable after initial setup)
VAULTWARDEN_SIGNUPS_ALLOWED=false
# Host port to expose the Vaultwarden web UI (default: 80)
VAULTWARDEN_PORT=80
# NFS server hostname or IP address
VAULTWARDEN_NFS_SERVER=
# NFS device path for Vaultwarden data storage (e.g. :/mnt/pool/vaultwarden/data)
VAULTWARDEN_NFS_DEVICE=
+32
View File
@@ -0,0 +1,32 @@
services:
app:
image: vaultwarden/server:${VAULTWARDEN_VERSION:-latest}
container_name: vaultwarden-app
environment:
- DOMAIN=${VAULTWARDEN_DOMAIN}
- ADMIN_TOKEN=${VAULTWARDEN_ADMIN_TOKEN}
- SIGNUPS_ALLOWED=${VAULTWARDEN_SIGNUPS_ALLOWED:-false}
volumes:
- vaultwarden-app:/data/
ports:
- ${VAULTWARDEN_PORT:-80}:80
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/alive"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
deploy:
resources:
limits:
memory: 512m
restart: unless-stopped
volumes:
vaultwarden-app:
name: vaultwarden-app
driver: local
driver_opts:
type: nfs
o: "addr=${VAULTWARDEN_NFS_SERVER},rw,noatime,rsize=65536,wsize=65536,timeo=600,nfsvers=4"
device: "${VAULTWARDEN_NFS_DEVICE}"