Browse Source

chg: [docuseal] clean folder, rm init

Boris Gallet 7 months ago
parent
commit
8b052cae15
  1. 4
      docuseal/README.org
  2. 24
      docuseal/hooks/init
  3. 2
      docuseal/hooks/postgres_database-relation-joined
  4. 15
      docuseal/hooks/web_proxy-relation-joined

4
docuseal/README.org

@ -1,5 +1,5 @@
# -*- ispell-local-dictionary: "english" -*-
## Charm for DocuSeal - allow to sign Documents
* Info
repo : https://github.com/docusealco/docuseal
From: https://github.com/docusealco/docuseal

24
docuseal/hooks/init

@ -1,24 +0,0 @@
#!/bin/bash
## Init is run on host
## For now it is run every time the script is launched, but
## it should be launched only once after build.
## Accessible variables are:
## - SERVICE_NAME Name of current service
## - DOCKER_BASE_IMAGE Base image from which this service might be built if any
## - SERVICE_DATASTORE Location on host of the DATASTORE of this service
## - SERVICE_CONFIGSTORE Location on host of the CONFIGSTORE of this service
set -e
version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
## bug: https://github.com/adoptium/containers/issues/215#issuecomment-1142046045
docker_version=$(docker info --format '{{.ServerVersion}}')
if ! version_gt "$docker_version" 20.10.0; then
err "Sorry, $SERVICE_NAME require docker version >= 20.10 (current: $docker_version)"
exit 1
fi

2
docuseal/hooks/postgres_database-relation-joined

@ -1,3 +1,5 @@
#!/bin/bash
set -e
PASSWORD="$(relation-get password)"

15
docuseal/hooks/web_proxy-relation-joined

@ -4,18 +4,17 @@ set -e
DOMAIN=$(relation-get domain) || exit 1
## These are mainly to setup the correct web-hook
if [ "$MASTER_BASE_SERVICE_NAME" == "$DOMAIN" ]; then
## This is because the IP will be the docker container version
USESSL=""
else
USESSL="CMD_PROTOCOL_USESSL: 'true'"
fi
## Don’t know why this is needed so removed
# if [ "$MASTER_BASE_SERVICE_NAME" == "$DOMAIN" ]; then
# ## This is because the IP will be the docker container version
# USESSL=""
# else
# USESSL="CMD_PROTOCOL_USESSL: 'true'"
# fi
config-add "\
services:
$MASTER_BASE_SERVICE_NAME:
environment:
FORCE_SSL: $DOMAIN
$USESSL
"
Loading…
Cancel
Save