SQLite writes three files — the database plus its -wal and -shm companions. Putting them in one directory means a deployment mounts a single path and a backup copies a single directory. - FOODSTER_DB defaults to ./data/foodster.db, and openDB creates the parent directory on startup rather than failing on a fresh checkout - compose bind-mounts ./data instead of using a named volume, so the file can be listed, copied and opened with any sqlite client without going through the container engine - the image runs as UID 65534, which cannot write to a host directory owned by someone else, so compose now sets user: from FOODSTER_UID/FOODSTER_GID - `make up` creates ./data first: left to the engine it appears root-owned and the app silently cannot write to it
15 lines
248 B
Plaintext
15 lines
248 B
Plaintext
# Local config — holds the registry hostname and the shared password.
|
|
.env
|
|
|
|
# Build output
|
|
/foodster
|
|
|
|
# Generated by `templ generate` during the container build.
|
|
*_templ.go
|
|
|
|
# The database and its SQLite companions.
|
|
/data/
|
|
*.db
|
|
*.db-shm
|
|
*.db-wal
|