From 6c586c6a8979e5da154957bfd6534d814a791996 Mon Sep 17 00:00:00 2001 From: tiyn Date: Sat, 13 Apr 2024 23:41:02 +0200 Subject: [PATCH] minor style changes, added graphics volume --- Dockerfile | 2 ++ README.md | 5 +++-- rebuild.sh | 2 ++ src/requirements.txt | 2 +- src/static/css/style.css | 3 +++ src/static/graphics/.gitkeep | 0 src/templates/template.html | 2 +- 7 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 src/static/graphics/.gitkeep diff --git a/Dockerfile b/Dockerfile index 3f2c87f..5effb65 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,8 @@ RUN pip3 install -r requirements.txt VOLUME /blog/templates/entry +VOLUME /blog/static/graphics + EXPOSE 5000 ENTRYPOINT [ "python3" ] diff --git a/README.md b/README.md index 6a8cae6..ae416da 100644 --- a/README.md +++ b/README.md @@ -58,10 +58,11 @@ The `config.py` can be found in the `src` folder. Set the following volumes with the -v tag. -| Volume-Name | Container mount | Description | -| ------------- | --------------------------- | ------------------------------------------------------------ | +| Volume-Name | Container mount | Description | +| ------------- | --------------------------- | -------------------------------------------------------- | | `config-file` | `/blog/config.py` | Config file | | `entries` | `/blog/templates/entry` | Directory for blog entries | +| `graphics` | `/blog/static/graphics` | Directory for images needed for entries | | `css` | `/blog/static/css` | (optional) Directory for css files | | `html` | `/blog/templates` | (optional) Directory for templates (entry-volume not needed) | diff --git a/rebuild.sh b/rebuild.sh index bfafcd1..40af304 100755 --- a/rebuild.sh +++ b/rebuild.sh @@ -6,4 +6,6 @@ docker run --name beaker-blog \ --restart unless-stopped \ -p "5000:5000" \ -e FLASK_ENV=development \ + -v entries:/blog/templates/entry \ + -v graphics:/blog/static/graphics \ -d tiyn/beaker-blog diff --git a/src/requirements.txt b/src/requirements.txt index 5ab13d0..4bbc1cd 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -1,2 +1,2 @@ -Flask==1.1.2 +Flask>=2.2.2 Markdown==3.1.1 diff --git a/src/static/css/style.css b/src/static/css/style.css index 1d1a16d..1550203 100644 --- a/src/static/css/style.css +++ b/src/static/css/style.css @@ -167,3 +167,6 @@ footer .center { padding-left: 20; } +figure { + padding:20px; +} diff --git a/src/static/graphics/.gitkeep b/src/static/graphics/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/templates/template.html b/src/templates/template.html index c696a91..77d4d05 100644 --- a/src/templates/template.html +++ b/src/templates/template.html @@ -25,7 +25,7 @@