Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
docker-nquakesv
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Grewe
docker-nquakesv
Commits
ed89afba
Commit
ed89afba
authored
8 years ago
by
Jan Grewe
Browse files
Options
Downloads
Patches
Plain Diff
initial commit
parents
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+66
-0
66 additions, 0 deletions
Dockerfile
start.sh
+53
-0
53 additions, 0 deletions
start.sh
supervisord.conf
+49
-0
49 additions, 0 deletions
supervisord.conf
with
168 additions
and
0 deletions
Dockerfile
0 → 100644
+
66
−
0
View file @
ed89afba
#
# nQuakeSV - The nQuake Server
#
# docker run --name nquakesv \
# -p 28501:28501/udp -p 28501:28501 -p 28000:28000 -p 30000:30000/udp \
# -v /local/path/to/pak1.pak:/nquakesv/id1/pak1.pak \
# -e HOSTNAME=nQuakeSV -e HOSTDNS=qw.example.com \
# -e ADMINNAME="John Doe" -e ADMINEMAIL="john.doe@example.com" \
# -e RCON=changeme -e QTVPW=changeme -e FFA=1 \
# registry.faked.org/nquakesv
#
FROM
ubuntu:latest
MAINTAINER
Jan Grewe <jan@faked.org>
# msdsv
EXPOSE
28501/udp
# qtv
EXPOSE
28501/tcp
# qtv web
EXPOSE
28000/tcp
# qwfwd
EXPOSE
30000/udp
ENV
DEBIAN_FRONTEND noninteractive
RUN
apt-get
-qq
update
&&
\
apt-get install -qqy --no-install-recommends \
ca-certificates \
curl \
supervisor \
unzip \
wget \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ARG
HOSTNAME
ENV
HOSTNAME ${HOSTNAME:-nQuakeSV}
ARG
HOSTDNS
ENV
HOSTDNS ${HOSTDNS:-qw.example.com}
ARG
QTV
ENV
QTV ${QTV:-y}
ARG
QWFWD
ENV
QWFWD ${QWFWD:-y}
ARG
ADMINNAME
ENV
ADMINNAME ${ADMINNAME:-John Doe}
ARG
ADMINEMAIL
ENV
ADMINEMAIL ${ADMINEMAIL:-john.doe@example.com}
ARG
RCON
ENV
RCON ${RCON:-changeme}
ARG
QTVPW
ENV
QTVPW ${QTVPW:-changeme}
ARG
SEARCHPAK
ENV
SEARCHPAK ${SEARCHPAK:-n}
ARG
FFA
ENV
FFA ${FFA:-0}
ENV
PORTS 1
RUN
curl
-kL
https://github.com/nQuake/server-linux/blob/master/releases/nquakesv_installer-linux-latest.tar.gz?raw
=
true
|
tar
xvz
\
&& printf "/nquakesv\n$HOSTNAME\n$HOSTDNS\n$PORTS\n$QTV\n$QWFWD\n$ADMINNAME\n$ADMINEMAIL\n$RCON\n$QTVPW\n$SEARCHPAK\n\n" | /bin/bash /install_nquakesv.sh
COPY
start.sh /nquakesv/start.sh
COPY
supervisord.conf /etc/supervisor/supervisord.conf
WORKDIR
/nquakesv
CMD
["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
This diff is collapsed.
Click to expand it.
start.sh
0 → 100644
+
53
−
0
View file @
ed89afba
#!/bin/bash
dir
=
'/nquakesv'
remote_ip
=
$(
curl http://myip.dnsomatic.com
)
[
-n
"
$hostdns
"
]
||
hostdns
=
$remote_ip
echo
"===== nQuakeSV Configuration ====="
echo
"Setting server name:
${
HOSTNAME
}
"
echo
$hostname
>
~/.nquakesv/hostname
/bin/sed
-i
"s/hostname .*/hostname
${
HOSTNAME
}
/"
ktx/port1.cfg
/bin/sed
-i
"s/.* k_motd1 .*/set k_motd1
\"
${
HOSTNAME
}
\"
/"
ktx/port1.cfg
/bin/sed
-i
"s/hostname .*/hostname
${
HOSTNAME
}
/"
qtv/qtv.cfg
/bin/sed
-i
"s/set hostname .*/set hostname
\"
${
HOSTNAME
}
\"
/"
qwfwd/qwfwd.cfg
echo
"Setting server hostname:
${
HOSTDNS
}
"
echo
$hostdns
>
~/.nquakesv/hostdns
echo
$remote_ip
>
~/.nquakesv/ip
#/bin/sed -i "s/qtv .*/qtv ${HOSTDNS}:28501/" qtv/qtv.cfg
/bin/sed
-i
"s/qtv .*/qtv 127.0.0.1:28501/"
qtv/qtv.cfg
/bin/sed
-i
"s/sv_serverip .*/sv_serverip
\"
${
remote_ip
}
:28501
\"
/"
ktx/port1.cfg
echo
"Setting server admin:
${
ADMINNAME
}
<
${
ADMINEMAIL
}
>"
echo
"
${
ADMINNAME
}
<
${
ADMINEMAIL
}
>"
>
~/.nquakesv/admin
/bin/sed
-i
"s/sv_admininfo .*/sv_admininfo
\"
${
ADMINNAME
}
<
${
ADMINEMAIL
}
>
\"
/"
ktx/port1.cfg
echo
"Setting rcon password:
${
RCON
}
"
/bin/sed
-i
"s/rcon_password
\"
.*
\"
.*/rcon_password
\"
${
RCON
}
\"
/"
${
dir
}
/ktx/pwd.cfg
echo
"Setting Qtv password:
${
QTVPW
}
"
/bin/sed
-i
"s/admin_password .*/admin_password
${
QTVPW
}
/"
qtv/qtv.cfg
echo
"Enabled FFA:
${
FFA
}
"
/bin/sed
-i
"s/set k_matchless .*/set k_matchless
${
FFA
}
/"
ktx/port1.cfg
if
[
${
FFA
}
==
1
]
;
then
/bin/sed
-i
"s/set k_use_matchless_dir .*/set k_use_matchless_dir 0/"
ktx/port1.cfg
/bin/sed
-i
"s/set k_defmode .*/set k_defmode ffa/"
ktx/port1.cfg
/bin/sed
-i
"s/set k_mode .*/set k_mode 3/"
ktx/port1.cfg
echo
"samelevel 0"
>>
ktx/port1.cfg
echo
'set k_ml_0 "dm1"'
>>
ktx/port1.cfg
echo
'set k_ml_0 "dm2"'
>>
ktx/port1.cfg
echo
'set k_ml_0 "dm3"'
>>
ktx/port1.cfg
echo
'set k_ml_0 "dm4"'
>>
ktx/port1.cfg
echo
'set k_ml_0 "dm5"'
>>
ktx/port1.cfg
echo
'set k_ml_0 "dm6"'
>>
ktx/port1.cfg
fi
echo
"=================================="
/usr/bin/supervisorctl start nquakesv:
*
exit
0
This diff is collapsed.
Click to expand it.
supervisord.conf
0 → 100644
+
49
−
0
View file @
ed89afba
[
supervisord
]
nodaemon
=
true
[
rpcinterface
:
supervisor
]
supervisor
.
rpcinterface_factory
=
supervisor
.
rpcinterface
:
make_main_rpcinterface
[
unix_http_server
]
file
= /
tmp
/
supervisor
.
sock
[
inet_http_server
]
port
=
28999
[
supervisorctl
]
serverurl
=
unix
:///
tmp
/
supervisor
.
sock
[
group
:
nquakesv
]
programs
=
mvdsv
,
qwfwd
,
qtv
[
program
:
start
]
command
=/
nquakesv
/
start
.
sh
startsecs
=
0
autostart
=
true
autorestart
=
false
stdout_logfile
=/
dev
/
stdout
stdout_logfile_maxbytes
=
0
[
program
:
mvdsv
]
command
=/
nquakesv
/
mvdsv
-
port
28501
-
game
ktx
+
exec
port1
.
cfg
directory
=/
nquakesv
autostart
=
false
stdout_logfile
=/
dev
/
stdout
stdout_logfile_maxbytes
=
0
redirect_stderr
=
true
[
program
:
qwfwd
]
command
=/
nquakesv
/
qwfwd
/
qwfwd
.
bin
directory
=/
nquakesv
/
qwfwd
autostart
=
false
stdout_logfile
=/
dev
/
stdout
stdout_logfile_maxbytes
=
0
redirect_stderr
=
true
[
program
:
qtv
]
command
=/
nquakesv
/
qtv
/
qtv
.
bin
+
exec
qtv
.
cfg
directory
=/
nquakesv
/
qtv
autostart
=
false
stdout_logfile
=/
dev
/
stdout
stdout_logfile_maxbytes
=
0
redirect_stderr
=
true
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment