-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
714 additions
and
503 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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
./.idea | ||
./ts3db_mariadb.ini | ||
./ts3server_config.ini | ||
./docker-compose.yml | ||
./docker-compose.yml | ||
.idea |
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,10 +1,6 @@ | ||
FROM alpine | ||
WORKDIR /teamspeak | ||
RUN apk --force-refresh --no-cache --purge -f -u add curl jq wget libstdc++ | ||
RUN apk --force-refresh --no-cache --purge -f -u add curl jq libstdc++ | ||
RUN adduser -u 1000 -S teamspeak teamspeak | ||
COPY entrypoint.sh entrypoint.sh | ||
RUN chown 1000 /teamspeak -R; chmod 700 /teamspeak -R; chmod 500 entrypoint.sh | ||
RUN mkdir /teamspeak/files | ||
RUN chown 1000 /teamspeak/files -R | ||
COPY --chown=1000:1000 entrypoint.sh entrypoint.sh | ||
USER 1000 | ||
ENTRYPOINT [ "sh", "-c", "./entrypoint.sh; ./ts3server license_accepted=1 inifile=ts3server.ini" ] | ||
ENTRYPOINT [ "sh", "-c", "/entrypoint.sh; cd /teamspeak; ./ts3server license_accepted=1 inifile=ts3server.ini" ] |
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,31 +1,34 @@ | ||
#!/usr/bin/env sh | ||
|
||
umask 0077 | ||
cd /teamspeak/ | ||
|
||
# Download latest ts3 server | ||
url=$(curl -s https://teamspeak.com/versions/server.json | jq -r '.linux.x86_64.mirrors."teamspeak.com"') | ||
download=$(echo "$url"| sed -r 's/amd64/alpine/g') | ||
wget -q "$download" -O teamspeak.tar.bz2 | ||
curl -s "$(echo "$url"| sed -r 's/amd64/alpine/g')" -o teamspeak.tar.bz2 | ||
|
||
# Extract ts3server files | ||
tar -xjf teamspeak.tar.bz2 --strip-components=1 | ||
|
||
# Set up directory | ||
[ -d "redist" ] && mv redist/* . | ||
[ -d "files" ] || mkdir files | ||
mkdir logs | ||
|
||
# Set up database config | ||
cat <<- EOF >ts3db_mariadb.ini | ||
[config] | ||
host='${MARIADB_HOST}' | ||
host='${MARIADB_HOST:db}' | ||
port='${MARIADB_PORT:-3306}' | ||
username='${MARIADB_USER}' | ||
username='${MARIADB_USER:teamspeak}' | ||
password='${MARIADB_PASSWORD}' | ||
database='${MARIADB_DATABASE}' | ||
database='${MARIADB_DATABASE:teamspeak}' | ||
socket='${MARIADB_SOCKET}' | ||
wait_until_ready=20 | ||
EOF | ||
chmod 400 ts3db_mariadb.ini | ||
EOF | ||
|
||
# Remove junk | ||
for file in teamspeak.tar.bz2 doc serverquerydocs CHANGELOG LICENSE ts3server_minimal_runscript.sh ts3server_startscript.sh redist tsdns; do rm -rf $file; done | ||
|
||
for file in teamspeak.tar.bz2 doc serverquerydocs CHANGELOG LICENSE ts3server_minimal_runscript.sh ts3server_startscript.sh redist; do rm -rf $file; done | ||
for file in *.so *.so.2 ts3server sql sql/*/; do chmod 500 "$file"; done | ||
# Set up permissions | ||
for file in *.so *.so.2 ts3server sql sql/*/ .; do chmod 500 "$file"; done | ||
chmod 400 ts3db_mariadb.ini |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
MARIADB_HOST=db | ||
MARIADB_PORT=3306 | ||
MARIADB_USER=teamspeak | ||
MARIADB_PASSWORD=teamspeak | ||
MARIADB_DATABASE=teamspeak |
18 changes: 6 additions & 12 deletions
18
examples/mariadb/docker-compose.yml → example/docker-compose.yml
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.