From fa443bcdde5afc0cf63f7bbbc091d70003332932 Mon Sep 17 00:00:00 2001 From: Alex Phillips Date: Sat, 5 Feb 2022 15:41:00 -0500 Subject: [PATCH] default location for db, linked config file to volume mount --- Dockerfile | 2 ++ Dockerfile.aarch64 | 2 ++ Dockerfile.armhf | 2 ++ root/etc/cont-init.d/40-config | 6 +++--- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0f25ad5..cc08d76 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,8 @@ ARG BUDGE_RELEASE LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="alex-phillips" +ENV BUDGE_DATABASE=/config/budge.db + RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 4a5f26b..1fed84c 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -7,6 +7,8 @@ ARG BUDGE_RELEASE LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="alex-phillips" +ENV BUDGE_DATABASE=/config/budge.db + RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index cc8ef81..840ffda 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -7,6 +7,8 @@ ARG BUDGE_RELEASE LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="alex-phillips" +ENV BUDGE_DATABASE=/config/budge.db + RUN \ echo "**** install build packages ****" && \ apk add --no-cache --virtual=build-dependencies \ diff --git a/root/etc/cont-init.d/40-config b/root/etc/cont-init.d/40-config index e7d08ec..ae8573d 100644 --- a/root/etc/cont-init.d/40-config +++ b/root/etc/cont-init.d/40-config @@ -5,10 +5,10 @@ cd /app/budge/backend touch /app/budge/backend/budge.sqlite # copy config -[[ ! -e /config/budge.db ]] && \ - mv /app/budge/backend/budge.sqlite +[[ ! -e /config/config.js ]] && \ + mv /app/budge/backend/build/ormconfig.js /config/config.js -ln -sf /config/budge.db /app/budge/backend/budge.sqlite +ln -sf /config/config.js /app/budge/backend/build/ormconfig.js # permissions chown -R abc:abc \