Skip to content

Commit f620b81

Browse files
committed
added utmaster to docker compose
1 parent d882dfa commit f620b81

5 files changed

Lines changed: 28 additions & 151 deletions

File tree

.env-local

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,9 @@ OPENSPY_SM_BIND_PORT=30734
2525
OPENSPY_CDKEY_BIND_ADDR=0.0.0.0
2626
OPENSPY_CDKEY_BIND_PORT=30694
2727
OPENSPY_PEERCHAT_BIND_ADDR=0.0.0.0
28-
OPENSPY_PEERCHAT_BIND_PORT=30838
28+
OPENSPY_PEERCHAT_BIND_PORT=30838
29+
OPENSPY_UTMASTER_BIND_ADDR=0.0.0.0
30+
OPENSPY_UTMASTER_BIND_PORT=30839
31+
OPENSPY_UTMASTER_MAPPINGS_PATH=utmaster.xml
32+
UTMASTER_MOTD_DATA=VGhpcyBpcyB0aGUgdXRtYXN0ZXIgZGVmYXVsdCBkb2NrZXIgbW90ZA==
33+
UTMASTER_MOTD_COMMUNITY_DATA=VGhpcyBpcyB0aGUgdXRtYXN0ZXIgZGVmYXVsdCBkb2NrZXIgY29tbXVuaXR5IG1vdGQ=

Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
FROM ubuntu:24.04 AS build
2-
ENV DEBIAN_FRONTEND noninteractive
2+
ENV DEBIAN_FRONTEND=noninteractive
33
RUN apt-get update
44
RUN apt-get install -y build-essential cmake git curl unzip zip pkg-config
55

66
RUN git clone https://github.com/microsoft/vcpkg.git
7-
ENV VCPKG_ROOT /vcpkg
8-
ENV PATH "$PATH:$VCPKG_ROOT"
7+
ENV VCPKG_ROOT=/vcpkg
8+
ENV PATH="$PATH:$VCPKG_ROOT"
99
WORKDIR /vcpkg
1010
RUN ./bootstrap-vcpkg.sh
11-
ENV VCPKG_TC_PATH "$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
11+
ENV VCPKG_TC_PATH="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
1212

1313

1414
RUN mkdir /root/fs-out
@@ -41,19 +41,20 @@ COPY cmake /root/cmake
4141
COPY code /root/code
4242
RUN mkdir /root/os-bin /root/os-make
4343
WORKDIR /root/os-make
44-
run ../build.sh
45-
run make
44+
RUN ../build.sh
45+
RUN make
4646
RUN mkdir -p /root/fs-out/opt/openspy/bin /root/fs-out/opt/openspy/lib
4747
RUN mv /root/os-make/bin/* /root/fs-out/opt/openspy/bin
4848
RUN mv /root/os-make/lib/* /root/fs-out/opt/openspy/lib
4949
COPY docker-support/run.sh /root/fs-out/opt/openspy/run.sh
50+
COPY docker-support/utmaster.xml /root/fs-out/opt/openspy/
5051
RUN chmod a+x /root/fs-out/opt/openspy/run.sh
5152

5253
WORKDIR /root/fs-out
5354
RUN tar -cvzf /fs-out.tar.gz *
5455

5556
FROM ubuntu:24.04
56-
ENV DEBIAN_FRONTEND noninteractive
57+
ENV DEBIAN_FRONTEND=noninteractive
5758
RUN apt-get update && apt-get -y dist-upgrade
5859
COPY --from=build /fs-out.tar.gz /root/fs.tar.gz
5960
RUN tar -xvzf /root/fs.tar.gz -C /

docker-compose.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,11 @@ services:
5757
RUN_FILE: peerchat
5858
env_file: .env-local
5959
image: chcniz/openspy-core
60+
utmaster:
61+
ports:
62+
- "28902:30839"
63+
environment:
64+
RUN_FILE: utmaster
65+
env_file: .env-local
66+
image: chcniz/openspy-core
6067

docker-support/openspy.xml

Lines changed: 0 additions & 143 deletions
This file was deleted.

docker-support/run.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,12 @@ if [[ -n $SSL_KEY_DATA ]]; then
1818
export OPENSPY_SSL_KEY=ssl_key.pem
1919
fi
2020

21+
if [[ -n $UTMASTER_MOTD_DATA ]]; then
22+
echo $UTMASTER_MOTD_DATA | base64 -d > motd.txt
23+
fi
24+
25+
if [[ -n $UTMASTER_MOTD_COMMUNITY_DATA ]]; then
26+
echo $UTMASTER_MOTD_COMMUNITY_DATA | base64 -d > motd_community.txt
27+
fi
2128

2229
eval bash -c $FILE_TO_RUN

0 commit comments

Comments
 (0)