From 4ae2b727039df3b675616d285f97811a6ed9c1a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=BCnch?= Date: Thu, 27 Jul 2023 22:24:26 +0200 Subject: [PATCH] Try to run the container as current user --- docker-compose.n8n.yaml | 1 + tests/test.bats | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docker-compose.n8n.yaml b/docker-compose.n8n.yaml index 0ed83f5..51e52a8 100644 --- a/docker-compose.n8n.yaml +++ b/docker-compose.n8n.yaml @@ -11,6 +11,7 @@ services: com.ddev.approot: $DDEV_APPROOT com.ddev.app-url: $DDEV_URL restart: "no" + user: '$DDEV_UID:$DDEV_GID' expose: - "5678" volumes: diff --git a/tests/test.bats b/tests/test.bats index 1cd015f..1f82490 100644 --- a/tests/test.bats +++ b/tests/test.bats @@ -18,7 +18,6 @@ health_checks() { teardown() { set -eu -o pipefail cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 ) - chmod 777 ${TESTDIR}/.ddev/n8n/data ddev delete -Oy ${PROJNAME} >/dev/null 2>&1 [ "${TESTDIR}" != "" ] && rm -rf ${TESTDIR} } @@ -28,7 +27,6 @@ teardown() { cd ${TESTDIR} echo "# ddev get ${DIR} with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3 ddev get ${DIR} - chmod 777 ${TESTDIR}/.ddev/n8n/data if ! ddev restart; then ddev logs -s n8n fi @@ -40,7 +38,6 @@ teardown() { cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 ) echo "# ddev get netz98/ddev-n8n with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3 ddev get netz98/ddev-n8n - chmod 777 ${TESTDIR}/.ddev/n8n/data if ! ddev restart >/dev/null; then ddev logs -s n8n fi