From 14e1f092c95c38182d430e7969c18a951047eabd Mon Sep 17 00:00:00 2001 From: Yuriy Gerasymov Date: Mon, 29 Jul 2024 13:51:10 -0700 Subject: [PATCH] Fix comments from Stas: DDEV_UID/GID. --- config.diffy.yaml | 2 +- docker-compose.diffy.yaml | 3 ++- install.yaml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config.diffy.yaml b/config.diffy.yaml index 0bcaa9c..10170d9 100644 --- a/config.diffy.yaml +++ b/config.diffy.yaml @@ -1,4 +1,4 @@ hooks: post-start: - - exec: cd /mnt/ddev_config/diffy-worker-main && npm install + - exec: bash -ci 'worker=/mnt/ddev_config/diffy-worker-main; ( [ ! -d $worker/node_modules ] && npm install --prefix $worker && chown -R $DDEV_UID:$DDEV_GID $worker/node_modules ) || rm -rf $worker/node_modules' service: diffy \ No newline at end of file diff --git a/docker-compose.diffy.yaml b/docker-compose.diffy.yaml index 75b1138..a49d08a 100644 --- a/docker-compose.diffy.yaml +++ b/docker-compose.diffy.yaml @@ -4,7 +4,6 @@ services: container_name: ddev-${DDEV_SITENAME}-diffy image: diffywebsite2/screenshot-worker:0.0.1 command: tail -f /dev/null - networks: [default, ddev_default] restart: "no" # These labels ensure this service is discoverable by ddev. labels: @@ -12,6 +11,8 @@ services: com.ddev.approot: $DDEV_APPROOT environment: - DDEV_HOSTNAME + - DDEV_UID + - DDEV_GID volumes: - ".:/mnt/ddev_config" - "ddev-global-cache:/mnt/ddev-global-cache" diff --git a/install.yaml b/install.yaml index f6bb186..4f9cf60 100644 --- a/install.yaml +++ b/install.yaml @@ -55,7 +55,7 @@ global_files: post_install_actions: - wget https://github.com/DiffyWebsite/diffy-worker/archive/refs/heads/main.zip - unzip main.zip - - rm main.zip + - rm -f main.zip - | #ddev-nodisplay #ddev-description:Create .env file