From d0fb3aece09285185da8c3d16cb4becabe8d4cb8 Mon Sep 17 00:00:00 2001 From: default Date: Mon, 7 Mar 2022 10:42:07 +0000 Subject: [PATCH] [NEW] add mailhog smtp ghost service --- mailhog/hooks/init | 2 ++ .../hooks/postgres_database-relation-joined | 17 ++++++++++ mailhog/metadata.yml | 31 +++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100755 mailhog/hooks/init create mode 100755 mailhog/hooks/postgres_database-relation-joined create mode 100644 mailhog/metadata.yml diff --git a/mailhog/hooks/init b/mailhog/hooks/init new file mode 100755 index 0000000..05a7907 --- /dev/null +++ b/mailhog/hooks/init @@ -0,0 +1,2 @@ +#!/bin/bash + diff --git a/mailhog/hooks/postgres_database-relation-joined b/mailhog/hooks/postgres_database-relation-joined new file mode 100755 index 0000000..4e62706 --- /dev/null +++ b/mailhog/hooks/postgres_database-relation-joined @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +PASSWORD="$(relation-get password)" +USER="$(relation-get user)" +DBNAME="$(relation-get dbname)" + + +config-add "\ +services: + $MASTER_BASE_SERVICE_NAME: + environment: + CMD_DB_URL: postgres://$USER:$PASSWORD@$TARGET_SERVICE_NAME/$DBNAME +" + +info "Configured $SERVICE_NAME code for $TARGET_SERVICE_NAME access." diff --git a/mailhog/metadata.yml b/mailhog/metadata.yml new file mode 100644 index 0000000..3cfb4be --- /dev/null +++ b/mailhog/metadata.yml @@ -0,0 +1,31 @@ +docker-image: mailhog/mailhog +data-resources: + - /home/mailhog + +default-options: + +uses: + web-proxy: + #constraint: required | recommended | optional + #auto: pair | summon | none ## default: pair + constraint: recommended + auto: pair + solves: + proxy: "Public access" + default-options: + target: !var-expand ${MASTER_BASE_SERVICE_NAME}:8025 + backup: + constraint: recommended + auto: pair + solves: + backup: "Automatic regular backup" + default-options: + ## First pattern matching wins, no pattern matching includes. + ## include-patterns are checked first, then exclude-patterns + ## Patterns rules: + ## - ending / for directory + ## - '*' authorized + ## - must start with a '/', will start from $SERVICE_DATASTORE + #exclude-patterns: + # - "/var/lib/odoo/sessions/" + -- 2.30.2