Исправление путей скриптов
All checks were successful
Docker / build (push) Successful in 33s

This commit is contained in:
2025-03-04 16:20:23 +04:00
parent ab3a808032
commit 3e776aaba2
2 changed files with 2 additions and 5 deletions

View File

@@ -22,6 +22,6 @@ WORKDIR /app
COPY ./start.sh ./ COPY ./start.sh ./
COPY ./rs-init.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}\""] 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}\""]

View File

@@ -2,15 +2,12 @@
set -euo pipefail set -euo pipefail
chmod +x /scripts/*
ls -l /scripts/
if [ ! -f /data/db/replS.et ]; then if [ ! -f /data/db/replS.et ]; then
echo "Can't find /data/db/replS.et! Setting up replSet..." echo "Can't find /data/db/replS.et! Setting up replSet..."
touch /data/db/replS.et touch /data/db/replS.et
/usr/bin/mongod --bind_ip_all --replSet "$MONGO_REPLICA_SET_NAME" & /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 fi
cp "$MONGO_KEY_FILE_PATH" "$MONGO_KEY_FILE_TARGET_PATH" cp "$MONGO_KEY_FILE_PATH" "$MONGO_KEY_FILE_TARGET_PATH"