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:
@@ -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 .
|
||||
|
||||
Reference in New Issue
Block a user