From d1fdde72a017ea74c4f4482baa514463508dbca8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 22 Dec 2019 19:33:40 +0100 Subject: [PATCH] [docker] begin preparation --- Dockerfile | 7 +++++++ entrypoint-post-https.sh | 2 ++ nginx.conf | 7 +++++++ 3 files changed, 16 insertions(+) create mode 100644 Dockerfile create mode 100755 entrypoint-post-https.sh create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2235ebe --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM ungleich/nginx-letsencrypt-ipv6 +LABEL maintainer = "docker@ungleich.ch" + +RUN apk add --no-cache py3-flask +COPY server.py / +COPY nginx.conf /etc/nginx/https.conf +COPY entrypoint-post-https.sh / diff --git a/entrypoint-post-https.sh b/entrypoint-post-https.sh new file mode 100755 index 0000000..ca3be5f --- /dev/null +++ b/entrypoint-post-https.sh @@ -0,0 +1,2 @@ +#!/bin/sh +python3 /server.py diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..57b9f49 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,7 @@ + location / { + proxy_pass http://localhost:5000; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + } \ No newline at end of file