diff --git a/demos/apache-proxy/000-default.conf b/demos/apache-proxy/000-default.conf new file mode 100644 index 00000000..5b6607a3 --- /dev/null +++ b/demos/apache-proxy/000-default.conf @@ -0,0 +1,13 @@ + + Options Indexes FollowSymLinks + AllowOverride None + Require all granted + + + + ServerName localhost + DocumentRoot /app/html + ProxyPreserveHost On + ProxyPass /prefix/ http://127.0.0.1:8001/ + Header add X-Proxied-By "Apache2 Debian" + diff --git a/demos/apache-proxy/Dockerfile b/demos/apache-proxy/Dockerfile index 40f5e31d..0854b552 100644 --- a/demos/apache-proxy/Dockerfile +++ b/demos/apache-proxy/Dockerfile @@ -27,31 +27,17 @@ ARG DATASETTE_REF RUN pip install https://github.com/simonw/datasette/archive/${DATASETTE_REF}.zip -# Append this to the end of the default httpd.conf file -RUN echo '\n\ -\n\ - Options Indexes FollowSymLinks\n\ - AllowOverride None\n\ - Require all granted\n\ -\n\ -\n\ -\n\ - ServerName localhost\n\ - DocumentRoot /app/html\n\ - ProxyPreserveHost On\n\ - ProxyPass /prefix/ http://127.0.0.1:8001/\n\ - Header add X-Proxied-By "Apache2 Debian"\n\ -\n\ -' > /etc/apache2/sites-enabled/000-default.conf +ADD 000-default.conf /etc/apache2/sites-enabled/000-default.conf WORKDIR /app RUN mkdir -p /app/html -RUN echo 'Datasette' > /app/html/index.html +RUN echo '

Demo is at /prefix/

' > /app/html/index.html ADD https://latest.datasette.io/fixtures.db /app/fixtures.db EXPOSE 80 +# Dynamically build supervisord config since it includes $DATASETTE_REF: RUN echo "[supervisord]" >> /app/supervisord.conf RUN echo "nodaemon=true" >> /app/supervisord.conf RUN echo "" >> /app/supervisord.conf