Fix SQLite support (#210)

SQLite DB was not writable because it was always located in
/usr/src/shynet/, which is owned by root and not writable by
appuser. SQLite needs the parent directory containing the DB file to be
writable by the running user.

The applied fix is to place the DB file in /var/local/shynet/db and to
create that directory in the Docker image with the right permissions.

SQLite setup is now documented in README as an alternative to Postgres.
This commit is contained in:
Fidel Ramos
2022-05-24 21:38:27 +02:00
committed by GitHub
parent 231421ebae
commit 96c9c0feec
4 changed files with 14 additions and 4 deletions

View File

@@ -37,7 +37,9 @@ RUN apk --purge del .build-deps && \
rm -rf /var/lib/apt/lists/* && \
rm /var/cache/apk/* && \
addgroup --system -g $GF_GID appgroup && \
adduser appuser --system --uid $GF_UID -G appgroup
adduser appuser --system --uid $GF_UID -G appgroup && \
mkdir -p /var/local/shynet/db/ && \
chown -R appuser:appgroup /var/local/shynet
# Install Shynet
COPY shynet .