From 746ce6d93b026ad0664560b3cf5e74c2143f0151 Mon Sep 17 00:00:00 2001 From: Cassowary Rusnov Date: Wed, 30 Nov 2022 16:25:04 -0800 Subject: [PATCH] Add fixup script to work around fluffychat docker image weirdness --- abra.sh | 2 +- compose.yml | 10 +++++++++- fixup.sh | 6 ++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100755 fixup.sh diff --git a/abra.sh b/abra.sh index 2d05267..fca71fc 100644 --- a/abra.sh +++ b/abra.sh @@ -1,2 +1,2 @@ export CONFIG_JSON_VERSION=v1 - +export FIXUP_SH_VERSION=v1 diff --git a/compose.yml b/compose.yml index 0e2a25b..0daf475 100644 --- a/compose.yml +++ b/compose.yml @@ -5,13 +5,17 @@ services: app: image: git.coopcloud.tech/coop-cloud/fluffychat:v1.7.1 environment: + - DOMAIN - FLUFFY_APPLICATION_NAME - FLUFFY_DEFAULT_HOMESERVER networks: - proxy configs: - source: config_json - target: /usr/share/nginx/config.json + target: /usr/share/nginx/html/config.json + - source: fixup_sh + target: /docker-entrypoint.d/00-fixup.sh + mode: 0555 deploy: restart_policy: condition: on-failure @@ -42,3 +46,7 @@ configs: name: ${STACK_NAME}_config_json_${CONFIG_JSON_VERSION} file: config.json.tmpl template_driver: golang + fixup_sh: + name: ${STACK_NAME}_fixup_sh_${FIXUP_SH_VERSION} + file: fixup.sh + diff --git a/fixup.sh b/fixup.sh new file mode 100755 index 0000000..70e69ee --- /dev/null +++ b/fixup.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# Do fixups to the deploy to make up for minor weirdnesses in the FluffyChat image. +if [ ! -e /usr/share/nginx/html/ ]; then + ln -s /usr/share/nginx/html/ /usr/share/nginx/html/web +fi