Commit 735a3971 authored by Matthias's avatar Matthias

Initial commit

parents
.git
.gitignore
.dockerignore
node_modules
[0.1.0]
* Initial version
{
"id": "com.teamspeak.cloudronapp",
"title": "Teamspeak Server",
"author": "Teamspeak authors",
"description": "file://DESCRIPTION.md",
"changelog": "file://CHANGELOG",
"tagline": "teamspeak server",
"version": "0.1.0",
"healthCheckPath": "/",
"httpPort": 8000,
"memoryLimit": 268435456,
"tcpPorts": {
"DEFAULT_PORT": {
"title": "Default Teamspeak Port",
"description": "Default Teamspeak Port (udp)",
"defaultValue": 8801
},
"SERVERQUERY_PORT": {
"title": "ServerQuery Listening Port",
"description": "ServerQuery Listening Port (tcp)",
"defaultValue": 10011
},
"FILETRANSFER_PORT": {
"title": "File transfer Port",
"description": "File transfer Port (tcp)",
"defaultValue": 30033
}
},
"addons": {
"localstorage": {},
"mysql": {}
},
"manifestVersion": 1,
"website": "https://www.teamspeak.com",
"contactEmail": "support@cloudron.io",
"icon": "logo.png",
"tags": [
"im", "voip"
],
"mediaLinks": [ ]
}
Please add the appstore description in markdown format here.
\ No newline at end of file
FROM cloudron/base:0.10.0
MAINTAINER Authors name <support@cloudron.io>
ENV TSVERSION=3.1.1
ENV TS3SERVER_LICENSE=accept
EXPOSE 8801/udp
EXPOSE 30033
EXPOSE 10011
RUN apt-get update && apt-get install libmariadb2
RUN mkdir -p /app/code/web /app/data/nginx /app/data/ts/files && \
wget http://dl.4players.de/ts/releases/${TSVERSION}/teamspeak3-server_linux_amd64-${TSVERSION}.tar.bz2 && \
tar xfvj teamspeak3-server_linux_amd64-${TSVERSION}.tar.bz2 -C /app/code && \
rm teamspeak3-server_linux_amd64-$TSVERSION.tar.bz2 && \
rm -rf /var/lib/nginx && ln -s /app/data/nginx/ /var/lib/nginx && \
ln -s /app/data/ts/ts3db_mysql.ini /app/code/teamspeak3-server_linux_amd64/ts3db_mysql.ini && \
ln -s /app/data/ts/files /app/code/teamspeak3-server_linux_amd64/files && \
chown -R cloudron.cloudron /app/code/teamspeak3-server_linux_amd64/
WORKDIR /app/code
# nginx stuff
RUN rm /etc/nginx/sites-enabled/* && \
rm -rf /var/log/nginx && mkdir /run/nginx && \
ln -s /run/nginx /var/log/nginx && \
chown -R www-data.www-data /app/data/ /run/
# copy index.html
COPY index.html /app/code/web
ADD start.sh /app/
ADD nginx.conf /etc/nginx/sites-enabled/
CMD [ "/app/start.sh" ]
<html>
<head>
<title> Cloudron Teamspeak app </title>
</head>
<body>
<h1 style="text-align: center;">Server online!</h1>
</body>
</html>
logo.png

102 KB

server {
listen 8000;
listen [::]:8000;
server_name _;
# required, else the limit is 1mb
client_max_body_size 20M;
location / {
root /app/code/web;
index index.html;
}
}
#!/bin/bash
set -eux
TS3SERVER_LICENSE=accept
mkdir -p /app/data/ts/files /app/data/nginx/
if [[ ! -d /app/data/ts/ts3server.ini ]]; then
echo "=> Detected first run"
# cp /app/code/teamspeak3-server_linux_amd64/ts3server_startscript_orig.sh /app/data/ts3server_startscript.sh
echo "
machine_id=
default_voice_port=8801
voice_ip=0.0.0.0
licensepath=
filetransfer_port=30033
filetransfer_ip=0.0.0.0
query_port=10011
query_ip=0.0.0.0
dbplugin=ts3db_mariadb
dbpluginparameter=ts3db_mysql.ini
dbsqlpath=sql/
dbsqlcreatepath=create_mariadb/
logpath=/run
logquerycommands=0
query_ip_whitelist=/app/data/ts/query_ip_whitelist.txt
query_ip_blacklist=/app/data/ts/query_ip_blacklist.txt
" >> /app/data/ts/ts3server.ini
echo "
[config]
host='${MYSQL_HOST}'
port='3306'
username='${MYSQL_USERNAME}'
password='${MYSQL_PASSWORD}'
database='${MYSQL_DATABASE}'
socket=
" >> /app/data/ts/ts3db_mysql.ini
touch /app/data/ts/query_ip_whitelist.txt
touch /app/data/ts/query_ip_blacklist.txt
fi
# update mysql information
rm /app/data/ts/ts3db_mysql.ini
echo "
[config]
host='${MYSQL_HOST}'
port='3306'
username='${MYSQL_USERNAME}'
password='${MYSQL_PASSWORD}'
database='${MYSQL_DATABASE}'
socket=
" >> /app/data/ts/ts3db_mysql.ini
chown -R www-data.www-data /app/data /run/
cd /app/code/teamspeak3-server_linux_amd64
# check if TURN port has changed and update it
#if [ -z ${TURN_TLS_PORT+x} ]; then TURN_TLS_PORT="5349"; fi
gosu www-data ./ts3server_minimal_runscript.sh start inifile=/app/data/ts/ts3server.ini logpath=/run/ PIDFILE=/run/ts3server.pid
exec /usr/sbin/nginx -g 'daemon off;'
#echo "=> Fixup the directory permissions"
## http://stackoverflow.com/questions/14752236/getting-remove-entry-secure-error-while-using-ruby-application
#chmod o+t -R /run
#
#echo "=> Run passenger application server"
#cp -rf /var/lib/gems/2.4.0/gems/passenger-5.2.1/buildout/support-binaries.orig /run/support-binaries
## ensure passenger does not write into /app/code
#export TMPDIR=/run
#passenger start --engine nginx --environment production --address 0.0.0.0 --port 3000 --pid-file /run/ts3server.pid --log-file /run/passenger.log
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment