From b98f9935bac5597e366d58a977ecd060eaee926b Mon Sep 17 00:00:00 2001 From: Lennard Brinkhaus Date: Wed, 20 Sep 2023 15:37:54 +0200 Subject: [PATCH] feat: implement lot of config stuff --- defaults/main.yml | 11 ++++++++++- templates/vaultwarden.quadlet.j2 | 15 ++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 21872f8..ff0ad1f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,3 +1,12 @@ --- vaultwarden_version: "1.29.2" -vaultwarden_identifier: "default" \ No newline at end of file +vaultwarden_identifier: "default" + +vaultwarden_smtp_host: "" +vaultwarden_smtp_port: "" +vaultwarden_smtp_from: "" +vaultwarden_smtp_username: "" +vaultwarden_smtp_password: "" +vaultwarden_smtp_security: "" + +vaultwarden_admin_token: "" diff --git a/templates/vaultwarden.quadlet.j2 b/templates/vaultwarden.quadlet.j2 index 6a1bbdf..6bbd373 100644 --- a/templates/vaultwarden.quadlet.j2 +++ b/templates/vaultwarden.quadlet.j2 @@ -7,6 +7,19 @@ Image=docker.io/vaultwarden/server:{{ vaultwarden_version }} Environment=TZ=Europe/Berlin Environment=DOMAIN=https://{{ vaultwarden_url }} +Environment=ROCKET_PORT=8080 +Environment=SIGNUPS_ALLOWED=false +Environment=ADMIN_TOKEN={{ vaultwarden_admin_token }} +Environment=WEBSOCKET_ENABLED=true + +Environment=SMTP_HOST={{ vaultwarden_smtp_host }} +Environment=SMTP_PORT={{ vaultwarden_smtp_port }} +Environment=SMTP_FROM={{ vaultwarden_smtp_from }} +Environment=SMTP_SECURITY={{ vaultwarden_smtp_security }} +Environment=SMTP_USERNAME={{ vaultwarden_smtp_username }} +Environment=SMTP_PASSWORD={{ vaultwarden_smtp_password }} + + Network=traefik.network @@ -24,7 +37,7 @@ PodmanArgs=--userns=keep-id --security-opt label=disable Label="traefik.http.routers.vaultwarden-{{ vaultwarden_identifier }}.tls.certresolver=resolver" Label="traefik.http.routers.vaultwarden-{{ vaultwarden_identifier }}.tls=true" Label="traefik.http.routers.vaultwarden-{{ vaultwarden_identifier }}.rule=Host(`{{ vaultwarden_url }}`)" -Label="traefik.http.routers.vaultwarden-{{ vaultwarden_identifier }}.loadbalancer.server.port=80" +Label="traefik.http.routers.vaultwarden-{{ vaultwarden_identifier }}.loadbalancer.server.port=8080" [Service] Restart=on-failure