2022-11-26 22:00:34 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
## vars
|
2023-08-18 16:14:05 +00:00
|
|
|
service_image="git.garbaye.fr/garbaye/vaultwarden"
|
2023-09-02 10:37:10 +00:00
|
|
|
service_version='1.29.2'
|
2022-11-26 22:00:34 +00:00
|
|
|
database_image="docker.io/library/postgres"
|
2023-08-10 19:30:36 +00:00
|
|
|
database_version='14-alpine'
|
2022-11-26 22:00:34 +00:00
|
|
|
database_path="/var/lib/postgresql/data"
|
|
|
|
database_dialect=postgres
|
|
|
|
database_port=5432
|
|
|
|
#database_image="docker.io/library/mariadb"
|
|
|
|
#database_version='10'
|
|
|
|
#database_path="/var/lib/mysql"
|
|
|
|
#database_dialect=mysql
|
|
|
|
#database_port=3306
|
2023-04-18 19:43:09 +00:00
|
|
|
## default vars : override with ENV var
|
|
|
|
GARBAYE_VAULTWARDEN_DOMAIN="${GARBAYE_VAULTWARDEN_ENV_DOMAIN:-http://localhost}"
|
2022-11-26 22:00:34 +00:00
|
|
|
## mandatory ENV vars
|
2023-04-18 19:43:09 +00:00
|
|
|
envvars='GARBAYE_VAULTWARDEN_ADMIN_PASSWORD GARBAYE_VAULTWARDEN_DATABASE_PASSWORD'
|
2022-11-26 22:00:34 +00:00
|
|
|
## internal vars : do not touch
|
|
|
|
project_name=${PWD##*/}
|
|
|
|
pod_name="pod_${project_name}"
|
|
|
|
service_name="pod-${pod_name}.service"
|
2023-08-18 16:14:05 +00:00
|
|
|
upstream_images="${service_image} ${database_image}"
|
2022-11-26 22:00:34 +00:00
|
|
|
datavolume="${project_name}_data"
|
|
|
|
dbvolume="${project_name}_database"
|
|
|
|
container_name="${project_name}_app"
|
|
|
|
db_container_name="${project_name}_database"
|
2023-04-18 19:43:09 +00:00
|
|
|
get_default_iface_ipv4 GARBAYE_SEAFILE_SMTP_SERVER
|