From bf1f87c6e8af7b58b65d5f7bae3995610d37a7c4 Mon Sep 17 00:00:00 2001 From: Dirk Heilig Date: Mon, 4 Jan 2021 11:12:51 +0100 Subject: [PATCH] add webserver container --- Dockerfile => generator/Dockerfile | 2 +- config.yaml => generator/config.yaml | 0 generator.php => generator/generator.php | 0 template.json => generator/template.json | 0 webserver/Dockerfile | 7 +++++++ webserver/spaceapi.conf | 5 +++++ 6 files changed, 13 insertions(+), 1 deletion(-) rename Dockerfile => generator/Dockerfile (97%) rename config.yaml => generator/config.yaml (100%) rename generator.php => generator/generator.php (100%) rename template.json => generator/template.json (100%) create mode 100644 webserver/Dockerfile create mode 100644 webserver/spaceapi.conf diff --git a/Dockerfile b/generator/Dockerfile similarity index 97% rename from Dockerfile rename to generator/Dockerfile index 898972d..dd7a14e 100644 --- a/Dockerfile +++ b/generator/Dockerfile @@ -10,7 +10,7 @@ RUN apt-get install -y \ RUN pecl install Mosquitto-alpha RUN echo "extension=mosquitto.so" >/etc/php/7.3/mods-available/mosquitto.ini RUN ln -s /etc/php/7.3/mods-available/mosquitto.ini /etc/php/7.3/cli/conf.d/20-mosquitto.ini -ADD . /app +ADD .. /app VOLUME /app/public diff --git a/config.yaml b/generator/config.yaml similarity index 100% rename from config.yaml rename to generator/config.yaml diff --git a/generator.php b/generator/generator.php similarity index 100% rename from generator.php rename to generator/generator.php diff --git a/template.json b/generator/template.json similarity index 100% rename from template.json rename to generator/template.json diff --git a/webserver/Dockerfile b/webserver/Dockerfile new file mode 100644 index 0000000..e0872e8 --- /dev/null +++ b/webserver/Dockerfile @@ -0,0 +1,7 @@ +FROM debian:buster +RUN apt-get update && apt-get install -y nginx-light +ADD spaceapi.conf /etc/nginx/sites-available +RUN rm /etc/nginx/sites-enabled/* +RUN ln -s /etc/nginx/sites-available/spaceapi.conf /etc/nginx/sites-enabled/ +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] diff --git a/webserver/spaceapi.conf b/webserver/spaceapi.conf new file mode 100644 index 0000000..c36c88d --- /dev/null +++ b/webserver/spaceapi.conf @@ -0,0 +1,5 @@ +server { + listen 80 default_server; + root /ap/public; + index spaceapi.json; +} \ No newline at end of file