diff --git a/CHANGELOG.md b/CHANGELOG.md index fde6691172..a21793b07c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,12 @@ and this project adheres to - #1244 - #1270 +### Fixed + +- 🐛(makefile) Windows compatibility fix for Docker volume mounting #1264 +- 🐛(minio) fix user permission error with Minio and Windows #1264 + + ## [3.5.0] - 2025-07-31 ### Added @@ -36,9 +42,7 @@ and this project adheres to - 🔧(project) change env.d system by using local files #1200 - ⚡️(frontend) improve tree stability #1207 - ⚡️(frontend) improve accessibility #1232 -- 🛂(frontend) block drag n drop when not desktop -#1239 - +- 🛂(frontend) block drag n drop when not desktop #1239 ### Fixed diff --git a/Makefile b/Makefile index 39d6a76450..20ecdfae54 100644 --- a/Makefile +++ b/Makefile @@ -35,9 +35,13 @@ DB_PORT = 5432 # -- Docker # Get the current user ID to use for docker run and docker exec commands -DOCKER_UID = $(shell id -u) -DOCKER_GID = $(shell id -g) -DOCKER_USER = $(DOCKER_UID):$(DOCKER_GID) +ifeq ($(OS),Windows_NT) +DOCKER_USER := 0:0 # run containers as root on Windows +else +DOCKER_UID := $(shell id -u) +DOCKER_GID := $(shell id -g) +DOCKER_USER := $(DOCKER_UID):$(DOCKER_GID) +endif COMPOSE = DOCKER_USER=$(DOCKER_USER) docker compose COMPOSE_E2E = DOCKER_USER=$(DOCKER_USER) docker compose -f compose.yml -f compose-e2e.yml COMPOSE_EXEC = $(COMPOSE) exec @@ -48,7 +52,7 @@ COMPOSE_RUN_CROWDIN = $(COMPOSE_RUN) crowdin crowdin # -- Backend MANAGE = $(COMPOSE_RUN_APP) python manage.py -MAIL_YARN = $(COMPOSE_RUN) -w /app/src/mail node yarn +MAIL_YARN = $(COMPOSE_RUN) -w //app/src/mail node yarn # -- Frontend PATH_FRONT = ./src/frontend diff --git a/bin/_config.sh b/bin/_config.sh index 7df0684105..b317352f5b 100644 --- a/bin/_config.sh +++ b/bin/_config.sh @@ -38,6 +38,10 @@ function _set_user() { # options: docker compose command options # ARGS : docker compose command arguments function _docker_compose() { + # Set DOCKER_USER for Windows compatibility with MinIO + if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || -n "${WSL_DISTRO_NAME:-}" ]]; then + export DOCKER_USER="0:0" + fi echo "🐳(compose) file: '${COMPOSE_FILE}'" docker compose \ diff --git a/docs/troubleshoot.md b/docs/troubleshoot.md index 1e480d2b53..cacc14b0ed 100644 --- a/docs/troubleshoot.md +++ b/docs/troubleshoot.md @@ -83,55 +83,6 @@ If you already have CRLF line endings in your local repository, the **best appro git commit -m "✏️(project) Fix line endings to LF" ``` -## Minio Permission Issues on Windows - -### Problem Description - -On Windows, you may encounter permission-related errors when running Minio in development mode with Docker Compose. This typically happens because: - -- **Windows file permissions** don't map well to Unix-style user IDs used in Docker containers -- **Docker Desktop** may have issues with user mapping when using the `DOCKER_USER` environment variable -- **Minio container** fails to start or access volumes due to permission conflicts - -### Common Symptoms - -- Minio container fails to start with permission denied errors -- Error messages related to file system permissions in Minio logs -- Unable to create or access buckets in the development environment -- Docker Compose showing Minio service as unhealthy or exited - -### Solution for Windows Users - -If you encounter Minio permission issues on Windows, you can temporarily disable user mapping for the Minio service: - -1. **Open the `compose.yml` file** - -2. **Comment out the user directive** in the `minio` service section: - ```yaml - minio: - # user: ${DOCKER_USER:-1000} # Comment this line on Windows if permission issues occur - image: minio/minio - environment: - - MINIO_ROOT_USER=impress - - MINIO_ROOT_PASSWORD=password - # ... rest of the configuration - ``` - -3. **Restart the services**: - ```bash - make run - ``` - -### Why This Works - -- Commenting out the `user` directive allows the Minio container to run with its default user -- This bypasses Windows-specific permission mapping issues -- The container will have the necessary permissions to access and manage the mounted volumes - -### Note - -This is a **development-only workaround**. In production environments, proper user mapping and security considerations should be maintained according to your deployment requirements. - ## Frontend File Watching Issues on Windows ### Problem Description