From a3e32a8576f382a019752a39676aaba09ec273a9 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Thu, 18 Jul 2024 20:54:08 -0300 Subject: [PATCH 1/2] chore: make possible start git folder at not empty folder Signed-off-by: Vitor Mattos --- .docker/scripts/entrypoint.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.docker/scripts/entrypoint.sh b/.docker/scripts/entrypoint.sh index d0ad465..b51ef49 100644 --- a/.docker/scripts/entrypoint.sh +++ b/.docker/scripts/entrypoint.sh @@ -6,7 +6,11 @@ groupmod --non-unique --gid "${HOST_GID}" www-data # Clone Nextcloud repository, if needed if [ ! -d ".git" ]; then - git clone --progress --single-branch --depth 1 --branch "${VERSION_NEXTCLOUD}" --recurse-submodules -j 4 https://github.com/nextcloud/server /var/www/html + git init + git remote add origin https://github.com/nextcloud/server + git fetch --depth=1 origin "${VERSION_NEXTCLOUD}" + git checkout "${VERSION_NEXTCLOUD}" + git submodule update --init --recursive mkdir data mkdir apps-writable mkdir apps-extra From ea9092201af2e0ee7b641eb48a460b133b4262a2 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Thu, 18 Jul 2024 20:54:26 -0300 Subject: [PATCH 2/2] fix: permission to write folder of mysql I didn't found the real reason but this is the problem: https://stackoverflow.com/questions/65345516/docker-permission-denied-to-local-mysql-volume Signed-off-by: Vitor Mattos --- docker-compose.yml | 10 +++++----- nextcloud | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) create mode 160000 nextcloud diff --git a/docker-compose.yml b/docker-compose.yml index 9d766f7..0a9dca1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,12 +13,9 @@ services: command: postgres -c log_statement=all mysql: image: mysql - cap_add: - - SYS_NICE # CAP_SYS_NICE volumes: - - ./.docker/config/mysql:/etc/mysql/conf.d - - ./volumes/mysql/dump:/docker-entrypoint-initdb.d - - ./volumes/mysql/data:/var/lib/mysql + - mysql-init:/docker-entrypoint-initdb.d + - mysql-data:/var/lib/mysql ports: - 127.0.0.1:3306:3306 restart: unless-stopped @@ -78,3 +75,6 @@ services: - 127.0.0.1:${MAILHOG_PORT:-8025}:8025 redis: image: redis +volumes: + mysql-init: + mysql-data: diff --git a/nextcloud b/nextcloud new file mode 160000 index 0000000..d237fd0 --- /dev/null +++ b/nextcloud @@ -0,0 +1 @@ +Subproject commit d237fd0e78af8bbff51f2802efd4db1d88457579