From 7d739dac17ecdbb360b4ec19bbcc0cda416fff70 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Sun, 18 Dec 2022 10:57:10 +0100 Subject: [PATCH] bastion: move to mongodb6 + python2 -> 3 + set mongodb to use always the same log file --- bot/bastion/Dockerfile | 6 +++--- bot/bastion/entrypoint.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bot/bastion/Dockerfile b/bot/bastion/Dockerfile index c23c30c..796e847 100644 --- a/bot/bastion/Dockerfile +++ b/bot/bastion/Dockerfile @@ -3,12 +3,12 @@ FROM --platform=$TARGETOS/$TARGETARCH node:18-bullseye LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" ## install mongo -RUN wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | apt-key add - \ - && echo "deb http://repo.mongodb.org/apt/debian bullseye/mongodb-org/5.0 main" | tee /etc/apt/sources.list.d/mongodb-org-5.0.list \ +RUN wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | apt-key add - \ + && echo "deb http://repo.mongodb.org/apt/debian bullseye/mongodb-org/6.0 main" | tee /etc/apt/sources.list.d/mongodb-org-6.0.list \ && apt update \ && apt install -y mongodb-org mongodb-org-server mongodb-org-shell mongodb-org-mongos mongodb-org-tools \ ## install bastion reqs - && apt install -y python build-essential git libtool netcat ffmpeg iproute2 curl tzdata \ + && apt install -y python3 build-essential git libtool netcat ffmpeg iproute2 curl tzdata \ ## add container user && useradd -d /home/container -m container -s /bin/bash diff --git a/bot/bastion/entrypoint.sh b/bot/bastion/entrypoint.sh index 7859814..c747df6 100644 --- a/bot/bastion/entrypoint.sh +++ b/bot/bastion/entrypoint.sh @@ -10,10 +10,10 @@ MODIFIED_STARTUP=$(echo -e $(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/ echo -e ":/home/container$ ${MODIFIED_STARTUP}" # start mongo -mongod --fork --dbpath /home/container/mongodb/ --port 27017 --logpath /home/container/mongod.log && until nc -z -v -w5 127.0.0.1 27017; do echo 'Waiting for mongodb connection...'; sleep 5; done +mongod --fork --dbpath /home/container/mongodb/ --port 27017 --logpath /home/container/mongod.log --logRotate reopen --logappend && until nc -z -v -w5 127.0.0.1 27017; do echo 'Waiting for mongodb connection...'; sleep 5; done # Run the Server eval ${MODIFIED_STARTUP} # stop mongo -mongo --eval \"db.getSiblingDB('admin').shutdownServer()\ +mongo --eval "db.getSiblingDB('admin').shutdownServer()"