From e79275a3ab166d26d521dac27f0f929b0f2473c5 Mon Sep 17 00:00:00 2001 From: Mischa Date: Fri, 24 Jul 2026 23:27:18 +0200 Subject: [PATCH] build: give Grav's form-upload staging its own named volume MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The image declares /var/www/html as a VOLUME, so tmp/forms// — where Grav parks FilePond uploads until the submit moves them into the page folder — lived in an anonymous volume that any container-recreating `docker compose up` discards, dropping the photos of a post that was filled in but not yet submitted. grav_tmp gives the staging area its own lifecycle. Also pins makefile.configureOnOpen off in the workspace, so the VS Code Makefile extension stops trying to configure a Makefile whose `-include .env` cannot be parsed as makefile syntax. Co-Authored-By: Claude Opus 5 --- docker-compose.yml | 10 ++++++++++ travel-blog-intotheeast.code-workspace | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1903a0b..351e81c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,6 +13,13 @@ services: volumes: - ./user:/var/www/html/user - ./php/php-local.ini:/usr/local/etc/php/conf.d/php-local.ini + # Grav stages form uploads in tmp/forms// before the submit moves + # them into the page folder. The image declares /var/www/html as a VOLUME, + # so without this it lives in an ANONYMOUS volume that is discarded on any + # `docker compose up` that recreates the container — dropping the photos of + # a post that was filled in but not yet submitted. Naming it gives the + # staging area its own lifecycle. + - grav_tmp:/var/www/html/tmp restart: unless-stopped travel-memories: @@ -24,3 +31,6 @@ services: - ./user/pages:/app/pages env_file: .env user: "${UID}:${GID}" + +volumes: + grav_tmp: diff --git a/travel-blog-intotheeast.code-workspace b/travel-blog-intotheeast.code-workspace index 362d7c2..26a18ea 100644 --- a/travel-blog-intotheeast.code-workspace +++ b/travel-blog-intotheeast.code-workspace @@ -3,5 +3,8 @@ { "path": "." } - ] + ], + "settings": { + "makefile.configureOnOpen": false + } } \ No newline at end of file