From b456c67cf0d53bfd239eb2173b89445e5625466e Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Tue, 18 Apr 2023 21:43:09 +0200 Subject: [PATCH] vaultwarden : ajout selinux emails, variables --- podman-vaultwarden/10_install.sh | 11 ++++++++++- podman-vaultwarden/docker-compose.yml | 4 ++-- podman-vaultwarden/vars.sh | 5 ++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/podman-vaultwarden/10_install.sh b/podman-vaultwarden/10_install.sh index 5b14290..401d61c 100755 --- a/podman-vaultwarden/10_install.sh +++ b/podman-vaultwarden/10_install.sh @@ -23,11 +23,20 @@ fi cat < .env # vaultwarden DATABASE_URL=postgresql://vaultwarden:${GARBAYE_VAULTWARDEN_DATABASE_PASSWORD}@database:${database_port}/vaultwarden -#ADMIN_TOKEN=${GARBAYE_VAULTWARDEN_ADMIN_PASSWORD} +ADMIN_TOKEN=${GARBAYE_VAULTWARDEN_ADMIN_PASSWORD} +DOMAIN=${GARBAYE_VAULTWARDEN_DOMAIN} # PostgreSQL POSTGRES_DB=vaultwarden POSTGRES_PASSWORD=${GARBAYE_VAULTWARDEN_DATABASE_PASSWORD} POSTGRES_USER=vaultwarden +# Signups +SIGNUPS_VERIFY=true +# SMTP +SMTP_HOST=${GARBAYE_SEAFILE_SMTP_SERVER} +SMTP_FROM=vaultwarden@garbaye.fr +SMTP_FROM_NAME=Vaultwarden +SMTP_SECURITY=off +SMTP_PORT=25 EOT export vaultwarden_image diff --git a/podman-vaultwarden/docker-compose.yml b/podman-vaultwarden/docker-compose.yml index 5ca975c..cd5ec97 100644 --- a/podman-vaultwarden/docker-compose.yml +++ b/podman-vaultwarden/docker-compose.yml @@ -16,7 +16,7 @@ services: # - POSTGRES_PASSWORD= # - POSTGRES_DB=vaultwarden volumes: - - database:${database_path} + - database:${database_path}:Z networks: backend: #restart: always @@ -25,7 +25,7 @@ services: container_name: ${container_name} image: ${vaultwarden_image}:${vaultwarden_version} volumes: - - data:/data + - data:/data:Z ports: - "127.0.0.1:8090:80" - "127.0.0.1:9090:3012" diff --git a/podman-vaultwarden/vars.sh b/podman-vaultwarden/vars.sh index c4fa732..34a8e7b 100644 --- a/podman-vaultwarden/vars.sh +++ b/podman-vaultwarden/vars.sh @@ -12,8 +12,10 @@ database_port=5432 #database_path="/var/lib/mysql" #database_dialect=mysql #database_port=3306 +## default vars : override with ENV var +GARBAYE_VAULTWARDEN_DOMAIN="${GARBAYE_VAULTWARDEN_ENV_DOMAIN:-http://localhost}" ## mandatory ENV vars -envvars='GARBAYE_VAULTWARDEN_DATABASE_PASSWORD' +envvars='GARBAYE_VAULTWARDEN_ADMIN_PASSWORD GARBAYE_VAULTWARDEN_DATABASE_PASSWORD' ## internal vars : do not touch project_name=${PWD##*/} pod_name="pod_${project_name}" @@ -23,3 +25,4 @@ datavolume="${project_name}_data" dbvolume="${project_name}_database" container_name="${project_name}_app" db_container_name="${project_name}_database" +get_default_iface_ipv4 GARBAYE_SEAFILE_SMTP_SERVER