build: give Grav's form-upload staging its own named volume
The image declares /var/www/html as a VOLUME, so tmp/forms/<session>/ — 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 <noreply@anthropic.com>
This commit is contained in:
@@ -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/<session>/ 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:
|
||||
|
||||
@@ -3,5 +3,8 @@
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
]
|
||||
],
|
||||
"settings": {
|
||||
"makefile.configureOnOpen": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user