Commit 61290f95 authored by doodlemania's avatar doodlemania

adding apache...

parent 002bdcc6
......@@ -11,9 +11,9 @@
"manifestVersion": 2,
"website": "https://cloudron.io/",
"contactEmail": "apps@cloudron.io",
"icon": "logo.png",
"addons": {
"localstorage": {}
"localstorage": {},
"turn": {}
},
"tags": [],
"mediaLinks": [],
......
FROM cloudron/base:2.0.0@sha256:f9fea80513aa7c92fe2e7bf3978b54c8ac5222f47a9a32a7f8833edf0eb5a4f4
EXPOSE 8080
RUN apt-get update && apt-get upgrade -y
RUN mkdir -p /app/code/spreed &&
cd /app/code/spreed &&
git clone https://github.com/strukturag/nextcloud-spreed-signaling.git . &&
make build &&
RUN mkdir -p /app/code/spreed && \
cd /app/code/spreed && \
git clone https://github.com/strukturag/nextcloud-spreed-signaling.git . && \
make build && \
mkdir /app/code/nats
RUN cd /app/code/nats &&
curl -L https://github.com/nats-io/nats-server/releases/download/v2.1.7/nats-server-v2.1.7-linux-amd64.zip -o nats-server.zip &&
unzip nats-server.zip &&
RUN cd /app/code/nats && \
curl -L https://github.com/nats-io/nats-server/releases/download/v2.1.7/nats-server-v2.1.7-linux-amd64.zip -o nats-server.zip && \
unzip nats-server.zip && \
mv nats-server-v2.1.7-linux-amd64/* .
RUN sudo curl -sL -o /etc/apt/trusted.gpg.d/morph027-janus.asc https://packaging.gitlab.io/janus/gpg.key &&
. /etc/lsb-release; echo "deb [arch=amd64] https://packaging.gitlab.io/janus/$DISTRIB_CODENAME $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/morph027-janus.list &&
apt update &&
RUN sudo curl -sL -o /etc/apt/trusted.gpg.d/morph027-janus.asc https://packaging.gitlab.io/janus/gpg.key && \
. /etc/lsb-release; echo "deb [arch=amd64] https://packaging.gitlab.io/janus/$DISTRIB_CODENAME $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/morph027-janus.list && \
apt update && \
apt install janus janus-tools -y
RUN rm /etc/apache2/sites-enabled/* \
&& sed -e 's,^ErrorLog.*,ErrorLog "/dev/stderr",' -i /etc/apache2/apache2.conf \
&& sed -e "s,MaxSpareServers[^:].*,MaxSpareServers 5," -i /etc/apache2/mods-available/mpm_prefork.conf \
&& a2disconf other-vhosts-access-log && a2enmod rewrite env proxy proxy_http proxy_wstunnel \
&& echo "Listen 8000" > /etc/apache2/ports.conf
ADD server.conf /app/code/spreed/server.conf
ADD janus.jcfg /etc/janus/janus.jcfg
ADD startup.sh /app/code/startup.sh
ADD apache2.conf /etc/apache2/sites-available/app.conf
RUN chmod +x /app/code/startup.sh
RUN chown -R www-data.www-data /app/code
CMD [ "/app/code/startup.sh" ]
#don't forget to set the turn server in janus.jcfg
#it's also in server.conf
This is the post install instructions
<VirtualHost *:443>
# ... existing configuration ...
# Enable proxying Websocket requests to the standalone signaling server.
ProxyPass "/standalone-signaling/" "ws://127.0.0.1:8080/"
RewriteEngine On
# Websocket connections from the clients.
RewriteRule ^/standalone-signaling/spreed$ - [L]
# Backend connections from Nextcloud.
RewriteRule ^/standalone-signaling/api/(.*) http://127.0.0.1:8080/api/$1 [L,P]
# ... existing configuration ...
</VirtualHost>
......@@ -66,7 +66,7 @@ connectionsperhost = 8
# If set to "true", certificate validation of backend endpoints will be skipped.
# This should only be enabled during development, e.g. to work with self-signed
# certificates.
#skipverify = false
skipverify = true
[nats]
# Url of NATS backend to use. This can also be a list of URLs to connect to
......
#!/bin/bash
set -eu
echo 'Starting janus in foregroundish mode (there is a -b we should use at some point)'
janus &
sleep 10;
sleep 5;
echo 'Startup nats in daemon mode'
/app/code/nats/nats-server &
sleep 10;
/app/code/spreed/signaling &
sleep 5;
echo 'Starting signaling'
/app/code/spreed/bin/signaling &
sleep 5;
echo "Starting apache..."
APACHE_CONFDIR="" source /etc/apache2/envvars
rm -f "${APACHE_PID_FILE}"
exec /usr/sbin/apache2 -DFOREGROUND
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