From 3f10b51da953f01e5c13498e648c349130ec825d Mon Sep 17 00:00:00 2001 From: jmanczak Date: Sat, 4 Apr 2026 23:50:30 +0200 Subject: [PATCH] compose.yaml comments, make docker:/app/data writable --- Dockerfile | 2 +- compose.yaml | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4db5d72..0a2f152 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,7 +53,7 @@ RUN adduser \ --uid "${UID}" \ appuser -RUN mkdir -p /app && chown appuser:appuser /app +RUN mkdir -p /app/data && chown -R appuser:appuser /app USER appuser WORKDIR /app ENV IN_DOCKER=true diff --git a/compose.yaml b/compose.yaml index 9fb6eac..1a67466 100644 --- a/compose.yaml +++ b/compose.yaml @@ -10,11 +10,17 @@ services: volumes: # Mnemosyne would greatly enjoy not having an ephemeral database. # If you're okay with storing it side by side with the compose file, - # this is one way to do it. Another is to use a docker volume. + # a bind mount like this is one way to do it. Remember to mkdir! - ./mnemodata:/app/data + # Another way is to use a docker volume. + # - mnemodata:/app/data environment: # DATABASE_URL is crucial for Mnemosyne to work; it will fail without it. - # point it at where you'd like your database to be. + # Point it at where you'd like your database to be. - DATABASE_URL=/app/data/db.db # Mnemosyne uses port 39321 for HTTP by default; # - PORT=39321 + +# Declaring a volume for the docker volume example. +# volumes: +# mnemodata: