-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #243 from lythx/dev
changes for 1.4.3
- Loading branch information
Showing
40 changed files
with
376 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,37 @@ | ||
# Creates a runnable environment with a dedicated server and trakman | ||
FROM node:lts-alpine | ||
# setup directory | ||
RUN mkdir -p /app/server | ||
# create directory, install xml editing tool and setup non-root user | ||
RUN adduser -h /app/server -s /bin/sh -D -u 1001 server && \ | ||
apk add xmlstarlet su-exec | ||
USER server | ||
WORKDIR /app/server | ||
# copy useful trakman files and entrypoint command | ||
COPY ./config ./trakmanbk/config | ||
COPY ./plugins ./trakmanbk/plugins | ||
COPY ./src ./trakmanbk/src | ||
COPY ./Plugins.ts ./package.json ./tsconfig.json ./CHANGELOG.md ./trakmanbk/ | ||
COPY --chmod=0755 ./docker_run.sh ./docker_run.sh | ||
COPY --chown=1001:1001 ./config ./trakmanbk/config | ||
COPY --chown=1001:1001 ./plugins ./trakmanbk/plugins | ||
COPY --chown=1001:1001 ./src ./trakmanbk/src | ||
COPY --chown=1001:1001 ./Plugins.ts ./package.json ./tsconfig.json ./CHANGELOG.md ./trakmanbk/ | ||
COPY --chown=1001:1001 --chmod=0755 ./docker_run.sh ./docker_run.sh | ||
# download dedicated server and remove unnecessary files | ||
RUN wget -O serv.zip http://files2.trackmaniaforever.com/TrackmaniaServer_2011-02-21.zip && \ | ||
unzip serv.zip && \ | ||
rm -r serv.zip CommandLine.html ListCallbacks.html ListMethods.html \ | ||
Readme_Dedicated.html RemoteControlExamples TrackmaniaServer.exe manialink_dedicatedserver.txt | ||
# get trakman dependencies and build | ||
WORKDIR /app/server/trakmanbk | ||
RUN npm i typescript@latest && \ | ||
RUN npm i && \ | ||
npm run build | ||
WORKDIR /app/server | ||
# backup important files to prevent them being deleted by mounting the volume | ||
# and install xml editing tool for server config | ||
RUN mv GameData/Config/dedicated_cfg.txt dedicated_cfg.txt.bk && \ | ||
mkdir -p Tracksbk/MatchSettings && \ | ||
mkdir -p Tracksbk/Campaigns/Nations && \ | ||
mv GameData/Tracks/MatchSettings/Nations/NationsBlue.txt Tracksbk/MatchSettings/MatchSettings.txt && \ | ||
mv GameData/Tracks/Campaigns/Nations/Blue Tracksbk/Campaigns/Nations/ && \ | ||
apk add xmlstarlet | ||
mv GameData/Tracks/Campaigns/Nations/Blue Tracksbk/Campaigns/Nations/ | ||
# expose volumes | ||
VOLUME /app/server/GameData/Config | ||
VOLUME /app/server/GameData/Tracks | ||
VOLUME /app/server/trakman | ||
VOLUME /root/.pm2/logs | ||
|
||
VOLUME /app/server/.pm2/logs | ||
# set user back to root to be able to chown volumes in the run script | ||
USER root | ||
CMD /app/server/docker_run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.