refactor with new directories
All checks were successful
Deploy / BuildandPush-Docker (push) Successful in 2m1s

This commit is contained in:
tueem 2024-10-19 10:05:24 +02:00
parent ded1e72412
commit 01fbd8d4c6
Signed by: tueem
GPG Key ID: 65C8667EC17A88FB
2 changed files with 23 additions and 18 deletions

@ -1,20 +1,18 @@
FROM xenon3d/archean-server-alpha
RUN rm -f /home/container
RUN adduser --disabled-password --home /home/container container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
CMD ["/bin/bash", "/entrypoint.sh"]
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 server/server.ini
COPY server.ini data/server/server.ini
COPY entrypoint.sh /entrypoint.sh
USER root
RUN chown -R container:container /home/container
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
@ -22,3 +20,10 @@ RUN chmod -R 755 /Archean-data
RUN chmod -R 755 /Archean-server-alpha
USER container
ENV USER=container HOME=/home/container
CMD ["/bin/bash", "/entrypoint.sh"]

@ -1,12 +1,12 @@
#!/bin/bash
sed "s/^game_mode=.*/game_mode=$( [ "$GAME_MODE" = "creative" ] && echo 0 || echo 1)/" server/server.ini > server/server.ini
sed "s/^server_online=.*/server_online=$( [ "$ONLINE_MODE" = "0" ] && echo no || echo yes)/" server/server.ini > server/server.ini
sed "s/^max_simultaneous_players=.*/max_simultaneous_players=$MAX_PLAYERS/" server/server.ini > server/server.ini
sed "s/^password=.*/password=$PASSWORD/" server/server.ini > server/server.ini
sed "s/^server_public_name=.*/server_public_name=$NAME/" server/server.ini > server/server.ini
sed "s/^listen_port=.*/listen_port=$SERVER_PORT/" server/server.ini > server/server.ini
sed "s/^spawn=.*/spawn=$SPAWN_PLANET/" server/server.ini > server/server.ini
sed "s/^auto_save_interval_seconds=.*/auto_save_interval_seconds=$AUTOSAVE_INTERVAL/" server/server.ini > server/server.ini
sed "s/^updates_per_second=.*/updates_per_second=$UPDATES_PER_SECOND/" server/server.ini > server/server.ini
sed "s/^physics_steps_per_update=.*/physics_steps_per_update=$PHYSICS_UPDATES_PER_UPDATE/" server/server.ini > server/server.ini
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
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
sed "s/^listen_port=.*/listen_port=$SERVER_PORT/" data/server/server.ini > data/server/server.ini
sed "s/^spawn=.*/spawn=$SPAWN_PLANET/" data/server/server.ini > data/server/server.ini
sed "s/^auto_save_interval_seconds=.*/auto_save_interval_seconds=$AUTOSAVE_INTERVAL/" data/server/server.ini > data/server/server.ini
sed "s/^updates_per_second=.*/updates_per_second=$UPDATES_PER_SECOND/" data/server/server.ini > data/server/server.ini
sed "s/^physics_steps_per_update=.*/physics_steps_per_update=$PHYSICS_UPDATES_PER_UPDATE/" data/server/server.ini > data/server/server.ini