From 88d15c1d496c17b5a44cc21db9f5d2e43fce5639 Mon Sep 17 00:00:00 2001 From: Andrew Simonson Date: Fri, 27 Jan 2023 21:57:26 -0600 Subject: [PATCH] housekeeping --- Dockerfile | 5 ++--- src/app.py | 9 +-------- src/requirements.txt | Bin 0 -> 472 bytes src/static/css/head.css | 2 +- src/static/sitemap.xml | 10 ++++++++++ 5 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 src/requirements.txt create mode 100644 src/static/sitemap.xml diff --git a/Dockerfile b/Dockerfile index c177760..b02d9a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,12 +3,11 @@ LABEL maintainer="Andrew Simonson " WORKDIR /app ADD ./src /app -COPY ./requirements.txt requirements.txt -RUN apt-get -yq update && \ - pip install --no-cache-dir -r requirements.txt COPY . . +RUN apt-get -yq update && \ + pip install --no-cache-dir -r ./src/requirements.txt WORKDIR /app/src CMD [ "gunicorn", "-k" , "geventwebsocket.gunicorn.workers.GeventWebSocketWorker", "--bind", "0.0.0.0:8080", "application:app"] \ No newline at end of file diff --git a/src/app.py b/src/app.py index 862a252..73488dc 100644 --- a/src/app.py +++ b/src/app.py @@ -1,9 +1,7 @@ import flask -from flask_sitemap import Sitemap import sass app = flask.Flask(__name__) -ext = Sitemap(app=app) sass.compile(dirname=('static/scss', 'static/css'), output_style='compressed') @app.route('/') @@ -29,15 +27,10 @@ def page404(e): finally: return flask.render_template('error.html', error=eCode, message=message, title=f'{eCode} - Simonson Portfolio'), eCode -# @app.route('/sitemap.xml') +@app.route('/sitemap.xml') @app.route('/robots.txt') def static_from_root(): return flask.send_from_directory(app.static_folder, flask.request.path[1:]) -# @ext.register_generator -# def index(): -# # Not needed if you set SITEMAP_INCLUDE_RULES_WITHOUT_PARAMS=True -# yield 'index', {} - if __name__ == '__main__': app.run() diff --git a/src/requirements.txt b/src/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..092dc061d34b4c3e8edca36f938b6d4f7d77f37f GIT binary patch literal 472 zcmYL_J5R$v5QL|W#7_Yw7l_i(QXo-LP{$@9=V4oZNRS^7e6wd_omO|+xtZD7-=9J! zRjPH=UY#B}E8XcqH(IC+tORp^OW)Xf!Wz&9&Q52_KbD~P)FysBf$!8$>_k78l|MD& zS>a%XI@l@rc31|#LbnZkh&c+~(%EZ3^_}u<*G({H)_|w+8W(43@aiXroFIk%bL2ko zGX=Uv$L<;RRtk7dkl9X`B14|<1*{|8$ds?VKXCIrPC4te`UWkpDn`7ctkL806)g8x eQx + + + https://asimonson.com + https://asimonson.com/about + https://asimonson.com/projects + https://asimonson.com/Resume + 2022-06-04 + + \ No newline at end of file