From 3e776aaba270d4e6ed8909eeec0d61617dffc343 Mon Sep 17 00:00:00 2001 From: N08I40K Date: Tue, 4 Mar 2025 16:20:23 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=83=D1=82=D0=B5=D0=B9=20?= =?UTF-8?q?=D1=81=D0=BA=D1=80=D0=B8=D0=BF=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- start.sh | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6eae0a9..39878ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,6 @@ WORKDIR /app COPY ./start.sh ./ COPY ./rs-init.sh ./ -ENTRYPOINT ["bash", "/scripts/start.sh"] +ENTRYPOINT ["bash", "/app/start.sh"] CMD ["sh", "-c", "exec /usr/bin/mongod --bind_ip_all --port ${MONGO_PORT} --replSet \"${MONGO_REPLICA_SET_NAME}\" --auth --keyFile \"${MONGO_KEY_FILE_TARGET_PATH}\""] \ No newline at end of file diff --git a/start.sh b/start.sh index 25e9e5e..0f430d8 100644 --- a/start.sh +++ b/start.sh @@ -2,15 +2,12 @@ set -euo pipefail -chmod +x /scripts/* -ls -l /scripts/ - if [ ! -f /data/db/replS.et ]; then echo "Can't find /data/db/replS.et! Setting up replSet..." touch /data/db/replS.et /usr/bin/mongod --bind_ip_all --replSet "$MONGO_REPLICA_SET_NAME" & - sleep 5 && bash /scripts/rs-init.sh + sleep 5 && bash /app/rs-init.sh fi cp "$MONGO_KEY_FILE_PATH" "$MONGO_KEY_FILE_TARGET_PATH"