-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
77 changed files
with
11,082 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
# Base Image | ||
FROM python:3.11-slim-bullseye | ||
# See https://hub.docker.com/r/tiangolo/uwsgi-nginx-flask/ | ||
FROM tiangolo/uwsgi-nginx-flask:python3.11 | ||
|
||
# Build args | ||
ARG VERSION | ||
|
||
# Working Directory | ||
WORKDIR /app | ||
# WORKDIR /app | ||
|
||
# Install packages from requirements.txt | ||
COPY requirements.txt . | ||
COPY requirements.txt /app/requirements.txt | ||
RUN pip install --no-cache-dir --upgrade pip &&\ | ||
pip install --no-cache-dir --trusted-host pypi.python.org -r requirements.txt | ||
|
||
# Copy source code to working directory | ||
COPY flaskserver ./flaskserver | ||
COPY ./app /app | ||
|
||
# Default env vars and command. | ||
ENV PORT=5000 | ||
# Default env vars | ||
ENV PORT=80 | ||
ENV VERSION=$VERSION | ||
CMD ["python", "flaskserver"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Base Image | ||
FROM python:3.11-slim-bullseye | ||
|
||
# Build args | ||
ARG VERSION | ||
|
||
# Working Directory | ||
WORKDIR /app | ||
|
||
# Install packages from requirements.txt | ||
COPY requirements.txt . | ||
RUN pip install --no-cache-dir --upgrade pip &&\ | ||
pip install --no-cache-dir --trusted-host pypi.python.org -r requirements.txt | ||
|
||
# Copy source code to working directory | ||
COPY flaskserver ./flaskserver | ||
|
||
# Default env vars and command. | ||
ENV PORT=5000 | ||
ENV VERSION=$VERSION | ||
CMD ["python", "flaskserver"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (C) 2011-2023 Hakim El Hattab, http://hakim.se, and reveal.js contributors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The slideshow part of the project uses Reveal.js. See https://github.com/hakimel/reveal.js/ and please note the licence conditions, which are copied here. | ||
|
||
Michael Saunby. February. 2023 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from flask import Flask, render_template | ||
import os | ||
|
||
app = Flask(__name__) | ||
version = os.environ.get('VERSION', 'v-.-.-') | ||
|
||
@app.route("/") | ||
def home(): | ||
return render_template('home.html', version=version) | ||
|
||
if __name__ == "__main__": | ||
port = os.environ.get('PORT') | ||
app.run(host='0.0.0.0', port=port) |
Oops, something went wrong.