Unverified Commit cd928db0 authored by Michel Roelofs's avatar Michel Roelofs Committed by Tammo Jan Dijkema
Browse files

Remove Apache, the console has its own http server

parent 66dcf4ee
......@@ -33,28 +33,10 @@ RUN chmod a+rwx /root
RUN mkdir -p /var/www/
RUN mkdir -p /var/www/console/htdocs/tle && cd /var/www/console/htdocs/tle && wget "http://celestrak.com/NORAD/elements/amateur.txt" -v -O amateur.txt && wget "http://celestrak.com/NORAD/elements/tle-new.txt" -v -O tle-new.txt && wget "http://celestrak.com/NORAD/elements/gps-ops.txt" -v -O gps-ops.txt && cd -
RUN apt-get update && apt-get -y install apache2 net-tools
RUN apt-get update && apt-get -y install net-tools
RUN mkdir -p /var/www/console/ && cp -r /root/dt_ctrl/console/htdocs /var/www/console && cp -r /root/dt_ctrl/console/js /var/www/console
# Configure apache to serve the console htdocs
RUN echo '\
<VirtualHost *:80>\n\
\tServerAdmin webmaster@localhost\n\
\tDocumentRoot /var/www/console/htdocs\n\
\t<Directory "/var/www/console/htdocs">\n\
\t\tOrder allow,deny\n\
\t\tAllow from all\n\
\t\tAllowOverride None\n\
\t\tAddHandler cgi-script .cgi\n\
\t\tOptions +ExecCGI -MultiViews +SymLinksIfOwnerMatch\n\
\t</Directory>\n\
\n\
ErrorLog ${APACHE_LOG_DIR}/error.log\n\
CustomLog ${APACHE_LOG_DIR}/access.log combined\n\
</VirtualHost>\n\
' > /etc/apache2/sites-enabled/000-default.conf
# Configure ports for the console and controller
RUN mkdir /etc/dt && echo '\
[console]\n\
......@@ -72,6 +54,6 @@ port=8000\n\
#RUN sed -i -e 's/window.location.host/window.location.hostname+":8000"/' /var/www/console/htdocs/index.html && \
# sed -i -e 's/window.location.host/window.location.hostname+":8000"/' /var/www/console/htdocs/mech.html
CMD screen -d -m /root/dt_ctrl/controller/dt_ctrl /root/dt_ctrl/controller/dt_ctrl.ctrl && screen -d -m bash -c 'cd /root/dt_ctrl/console/console && ./start_console.sh' && /bin/bash -c 'service apache2 start' && bash
CMD ulimit -n 1024 && screen -d -m /root/dt_ctrl/controller/dt_ctrl /root/dt_ctrl/controller/dt_ctrl.ctrl && screen -d -m bash -c 'cd /root/dt_ctrl/console/console && ./start_console.sh' && bash
EXPOSE 8000
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