Browse Source

fix: [hedgedoc] fix upload of image and updatge to ``1.7.2``

Signed-off-by: default <default@vps802479>
dev
default 4 years ago
committed by Valentin Lab
parent
commit
fba9cbb56f
  1. 6
      hedgedoc/hooks/init
  2. 22
      hedgedoc/hooks/web_proxy-relation-joined
  3. 4
      hedgedoc/metadata.yml

6
hedgedoc/hooks/init

@ -7,6 +7,6 @@ $SERVICE_NAME:
"
## ``codimd`` create uploads folder with wrong permission
mkdir -p "$SERVICE_DATASTORE/home/hackmd/app/public/uploads"
chown -R 1500:1500 "$SERVICE_DATASTORE/home/hackmd/app/public/"
uid=$(docker_get_uid "$SERVICE_NAME" "hedgedoc")
mkdir -p "$SERVICE_DATASTORE/hedgedoc/public/uploads"
chown "$uid" "$SERVICE_DATASTORE/hedgedoc/public/uploads"

22
hedgedoc/hooks/web_proxy-relation-joined

@ -0,0 +1,22 @@
#!/bin/bash
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
config-add "\
services:
$MASTER_BASE_SERVICE_NAME:
environment:
CMD_DOMAIN: $DOMAIN
$USESSL
"

4
hedgedoc/metadata.yml

@ -1,6 +1,6 @@
docker-image: docker.0k.io/hedgedoc:1.7.0 ## from: quay.io/hedgedoc/hedgedoc:1.7.0-alpine
docker-image: docker.0k.io/hedgedoc:1.7.2 ## from: quay.io/hedgedoc/hedgedoc:1.7.2-alpine
data-resources:
- /home/hackmd/app/public/uploads
- /hedgedoc/public/uploads
default-options:

Loading…
Cancel
Save