changes for another approach
Some checks failed
Deploy / BuildandPush-Docker (push) Has been cancelled

This commit is contained in:
tueem 2024-10-20 13:38:09 +02:00
parent 01fbd8d4c6
commit e735620205
Signed by: tueem
GPG Key ID: 65C8667EC17A88FB
3 changed files with 12 additions and 34 deletions

@ -1,28 +1,10 @@
FROM xenon3d/archean-server-alpha
FROM ghcr.io/pelican-eggs/yolks:debian
RUN rm -f /home/container
RUN adduser --disabled-password --home /home/container container
USER root
WORKDIR /home/container
RUN ln -s /Archean-data/ /home/container/data
RUN ln -s /Archean-server-alpha/ /home/container/bin
COPY archean_start.sh archean_start.sh
COPY server.ini data/server/server.ini
COPY entrypoint.sh /entrypoint.sh
RUN chown -R container:container /home/container/
RUN chown -R container:container /Archean-data/
RUN chown -R container:container /Archean-server-alpha/
RUN chmod -R 755 /home/container
RUN chmod -R 755 /Archean-data
RUN chmod -R 755 /Archean-server-alpha
RUN apt install openssl libpng16-16 libharfbuzz-bin
USER container
ENV USER=container HOME=/home/container
CMD ["/bin/bash", "/entrypoint.sh"]

@ -1,7 +1,14 @@
#!/bin/bash
sed "s/^game_mode=.*/game_mode=$( [ "$GAME_MODE" = "creative" ] && echo 0 || echo 1)/" data/server/server.ini > data/server/server.ini
sed "s/^server_online=.*/server_online=$( [ "$ONLINE_MODE" = "0" ] && echo no || echo yes)/" data/server/server.ini > data/server/server.ini
DIRECTORY="Archean-data"
if [ ! -d "$DIRECTORY" ]; then
curl -o "$DIRECTORY/server/server.ini" https://git.tomatentum.net/tueem/archean-server-pelican/raw/branch/master/server.ini
fi
sed "s/^game_mode=.*/game_mode=$( [ "$GAME_MODE" = "creative" ] && echo 0 || echo 1)/" Archean-data/server/server.ini > Archean-data/server/server.ini
sed "s/^server_online=.*/server_online=$( [ "$ONLINE_MODE" = "0" ] && echo no || echo yes)/" Archean-data/server/server.ini > Archean-data/server/server.ini
sed "s/^max_simultaneous_players=.*/max_simultaneous_players=$MAX_PLAYERS/" data/server/server.ini > data/server/server.ini
sed "s/^password=.*/password=$PASSWORD/" data/server/server.ini > data/server/server.ini
sed "s/^server_public_name=.*/server_public_name=$NAME/" data/server/server.ini > data/server/server.ini

@ -1,11 +0,0 @@
#!/bin/bash
cd /home/container
./archean_start.sh
# Replace Startup Variables
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`
echo ":/home/container$ ${MODIFIED_STARTUP}"
# Run the Server
${MODIFIED_STARTUP}