Browse Source

refactor: ensure litestream binary is on PATH

pull/8494/head
Salim B 6 months ago
parent
commit
439a94f94e
No known key found for this signature in database
GPG Key ID: C7657487017FE6D5
  1. 4
      packages/nocodb/Dockerfile
  2. 4
      packages/nocodb/docker/start-litestream.sh
  3. 4
      packages/nocodb/litestream/Dockerfile

4
packages/nocodb/Dockerfile

@ -61,8 +61,8 @@ RUN apk --update --no-cache add \
nodejs \
dumb-init
# Copy litestream binary build
COPY --from=lt-builder /usr/src/lt /usr/src/appEntry/litestream
# Copy litestream binary
COPY --from=lt-builder /usr/src/lt /usr/local/bin/litestream
# Copy production code & main entry file
COPY --from=builder /usr/src/app/ /usr/src/app/
COPY --from=builder /usr/src/appEntry/ /usr/src/appEntry/

4
packages/nocodb/docker/start-litestream.sh

@ -15,12 +15,12 @@ if [ -n "${AWS_ACCESS_KEY_ID}" ] && [ -n "${AWS_SECRET_ACCESS_KEY}" ] && [ -n "$
rm "${NC_TOOL_DIR}noco.db-wal"
fi
/usr/src/appEntry/litestream restore -o "${NC_TOOL_DIR}noco.db" "s3://$AWS_BUCKET/$AWS_BUCKET_PATH"
litestream restore -o "${NC_TOOL_DIR}noco.db" "s3://$AWS_BUCKET/$AWS_BUCKET_PATH"
if [ ! -f "${NC_TOOL_DIR}noco.db" ]
then
touch "${NC_TOOL_DIR}noco.db"
fi
/usr/src/appEntry/litestream replicate "${NC_TOOL_DIR}noco.db" "s3://$AWS_BUCKET/$AWS_BUCKET_PATH" &
litestream replicate "${NC_TOOL_DIR}noco.db" "s3://$AWS_BUCKET/$AWS_BUCKET_PATH" &
fi
node docker/main.js

4
packages/nocodb/litestream/Dockerfile

@ -84,8 +84,8 @@ RUN apk --update --no-cache add \
nodejs \
tar
# Copy litestream binary build
COPY --from=lt /usr/src/lt /usr/src/appEntry/litestream
# Copy litestream binary
COPY --from=lt /usr/src/lt /usr/local/bin/litestream
# Copy production code & main entry file
COPY --from=builder /usr/src/app/ /usr/src/app/
COPY --from=builder /usr/src/appEntry/ /usr/src/appEntry/

Loading…
Cancel
Save