@@ -18,5 +18,5 @@ ADD entrypoint.sh /build
ADD src /build
RUN chown -R buildrun:buildrun /build
USER buildrun
-EXPOSE 27650 27000 28900 27900 27950 27951 27953
+EXPOSE 27650/udp 27000/udp 28900/udp 27900/udp 27950/udp 27951/udp 27953/udp
ENTRYPOINT ["/build/entrypoint.sh"]
@@ -4,9 +4,11 @@ services:
restart: always
build: ./
image: lasange:masterserver
- deploy:
- replicas: 1
- resources:
- limits:
- cpus: "0.2"
- memory: 2500M
+ ports:
+ - "27000/udp"
+ - "27650/udp"
+ - "27900/udp"
+ - "27950/udp"
+ - "27951/udp"
+ - "28900/udp"
+ # see https://docs.docker.com/compose/compose-file/#ports
@@ -1,8 +1,17 @@
#!/bin/bash
-set -e
cd /build/masterserver
make
-./masterserver -p ./plugins
-echo The masterserver stopped.
-sleep 1
+# delete the compiled plugins that we don't want to run:
+rm -f plugins/libef*
+
+x=1
+y=5
+while [ $x -le $y ]; do
+ echo "Starting $x/$y times"
+ x=$(( $x + 1 ))
+ ./masterserver -p ./plugins
+ echo The masterserver stopped.
+ sleep 1
+done
+echo giving up.
@@ -1,3 +1,4 @@
-docker-compose build && docker-compose up -d
+# to change run parameters, edit docker-compose.yml
+docker-compose build --force-rm --pull && docker-compose up # add a -d here to run in background