From bcbf36d7a0a7000d423cda4a3424c3ded2bf7e27 Mon Sep 17 00:00:00 2001 From: TiynGER Date: Sun, 24 May 2020 17:51:22 +0200 Subject: [PATCH] adding dockerfile --- README.md | 2 +- docker/Dockerfile | 23 +++++++++++++++++++ app.py => src/app.py | 0 content.py => src/content.py | 0 requirements.txt => src/requirements.txt | 0 {static => src/static}/css/blog.css | 0 {static => src/static}/css/style.css | 0 {templates => src/templates}/archive.html | 0 .../templates}/entry/test-entry1.html | 0 .../templates}/entry/test-entry2.html | 0 .../templates}/entry/test-entry3.md | 0 {templates => src/templates}/error.html | 0 {templates => src/templates}/index.html | 0 {templates => src/templates}/rss.xml | 0 {templates => src/templates}/template.html | 0 15 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 docker/Dockerfile rename app.py => src/app.py (100%) rename content.py => src/content.py (100%) rename requirements.txt => src/requirements.txt (100%) rename {static => src/static}/css/blog.css (100%) rename {static => src/static}/css/style.css (100%) rename {templates => src/templates}/archive.html (100%) rename {templates => src/templates}/entry/test-entry1.html (100%) rename {templates => src/templates}/entry/test-entry2.html (100%) rename {templates => src/templates}/entry/test-entry3.md (100%) rename {templates => src/templates}/error.html (100%) rename {templates => src/templates}/index.html (100%) rename {templates => src/templates}/rss.xml (100%) rename {templates => src/templates}/template.html (100%) diff --git a/README.md b/README.md index 07081de..e8988dc 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This is a simple blog based on Pythons Flask framework. ## Deployment -- `pip3 install requirements.txt` - install depenencies +- `pip3 install -r requirements.txt` - install depenencies - run `python app.py` - blog is available on port 5000 diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..3161af2 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,23 @@ +FROM ubuntu + +MAINTAINER Tiyn tiyn@martenkante.eu + +RUN apt-get update + +RUN apt-get install python3 python3-pip -y + +RUN git clone https://github.com/tiyn/flaskblog /blog + +WORKDIR /blog/src + +RUN pip3 install -r requirements.txt + +VOLUME /blog/src/static/css + +VOLUME /blog/src/templates + +EXPOSE 5000 + +ENTRYPOINT [ "python3" ] + +CMD [ "app.py" ] diff --git a/app.py b/src/app.py similarity index 100% rename from app.py rename to src/app.py diff --git a/content.py b/src/content.py similarity index 100% rename from content.py rename to src/content.py diff --git a/requirements.txt b/src/requirements.txt similarity index 100% rename from requirements.txt rename to src/requirements.txt diff --git a/static/css/blog.css b/src/static/css/blog.css similarity index 100% rename from static/css/blog.css rename to src/static/css/blog.css diff --git a/static/css/style.css b/src/static/css/style.css similarity index 100% rename from static/css/style.css rename to src/static/css/style.css diff --git a/templates/archive.html b/src/templates/archive.html similarity index 100% rename from templates/archive.html rename to src/templates/archive.html diff --git a/templates/entry/test-entry1.html b/src/templates/entry/test-entry1.html similarity index 100% rename from templates/entry/test-entry1.html rename to src/templates/entry/test-entry1.html diff --git a/templates/entry/test-entry2.html b/src/templates/entry/test-entry2.html similarity index 100% rename from templates/entry/test-entry2.html rename to src/templates/entry/test-entry2.html diff --git a/templates/entry/test-entry3.md b/src/templates/entry/test-entry3.md similarity index 100% rename from templates/entry/test-entry3.md rename to src/templates/entry/test-entry3.md diff --git a/templates/error.html b/src/templates/error.html similarity index 100% rename from templates/error.html rename to src/templates/error.html diff --git a/templates/index.html b/src/templates/index.html similarity index 100% rename from templates/index.html rename to src/templates/index.html diff --git a/templates/rss.xml b/src/templates/rss.xml similarity index 100% rename from templates/rss.xml rename to src/templates/rss.xml diff --git a/templates/template.html b/src/templates/template.html similarity index 100% rename from templates/template.html rename to src/templates/template.html