Created dockerfile for running WMGZON web application

This commit is contained in:
Luke Else 2024-01-01 15:39:48 +00:00
parent f633660307
commit ce24d792cf
5 changed files with 19 additions and 3 deletions

5
app.py
View File

@ -1,6 +1,7 @@
from flask import Flask, render_template
from flask import Flask
from os import environ
from web import blueprint
'''
Main entrypoint for Flask application.
Initialises any components that are needed at runtime such as the
@ -20,7 +21,7 @@ def main():
# Register a blueprint
app.register_blueprint(blueprint)
app.run(debug=True)
app.run(debug=True, host="0.0.0.0")
if __name__ == "__main__":
main()

View File

@ -10,4 +10,12 @@ services:
- ./data:/root/db
ports:
- '9000:9000'
restart: unless-stopped
restart: unless-stopped
wmgzon:
container_name: "wmgzon"
build: .
ports:
- "5000:5000"
volumes:
- .:/code

7
dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM python:latest
COPY ./requirements.txt /app/requirements.txt
WORKDIR /app
RUN pip install -r requirements.txt
COPY . /app
ENTRYPOINT [ "python" ]
CMD ["app.py" ]

View File

0
scripts/run_tests.sh Normal file
View File