Browse Source

fix: make start scripts more robust

pull/8494/head
Salim B 5 months ago
parent
commit
8ad3624b24
No known key found for this signature in database
GPG Key ID: C7657487017FE6D5
  1. 8
      packages/nocodb/docker/start-litestream.sh
  2. 2
      packages/nocodb/docker/start-local.sh

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

@ -1,8 +1,6 @@
#!/bin/sh #!/bin/sh
#sleep 5 if [ ! -d "${NC_TOOL_DIR}" ] ; then
if [ -n "${NC_TOOL_DIR}" ]; then
mkdir -p "$NC_TOOL_DIR" mkdir -p "$NC_TOOL_DIR"
fi fi
@ -10,8 +8,8 @@ if [ -n "${LITESTREAM_S3_ENDPOINT}" ] && [ -n "${LITESTREAM_S3_BUCKET}" ] && [ -
if [ -f "${NC_TOOL_DIR}noco.db" ] ; then if [ -f "${NC_TOOL_DIR}noco.db" ] ; then
rm "${NC_TOOL_DIR}noco.db" rm "${NC_TOOL_DIR}noco.db"
rm "${NC_TOOL_DIR}noco.db-shm" rm -f "${NC_TOOL_DIR}noco.db-shm"
rm "${NC_TOOL_DIR}noco.db-wal" rm -f "${NC_TOOL_DIR}noco.db-wal"
fi fi
litestream restore "${NC_TOOL_DIR}noco.db" litestream restore "${NC_TOOL_DIR}noco.db"

2
packages/nocodb/docker/start-local.sh

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
if [ -n "${NC_TOOL_DIR}" ]; then if [ ! -d "${NC_TOOL_DIR}" ]; then
mkdir -p "$NC_TOOL_DIR" mkdir -p "$NC_TOOL_DIR"
fi fi

Loading…
Cancel
Save