Created dockerfile for running WMGZON web application
This commit is contained in:
parent
f633660307
commit
ce24d792cf
5
app.py
5
app.py
@ -1,6 +1,7 @@
|
|||||||
from flask import Flask, render_template
|
from flask import Flask
|
||||||
from os import environ
|
from os import environ
|
||||||
from web import blueprint
|
from web import blueprint
|
||||||
|
|
||||||
'''
|
'''
|
||||||
Main entrypoint for Flask application.
|
Main entrypoint for Flask application.
|
||||||
Initialises any components that are needed at runtime such as the
|
Initialises any components that are needed at runtime such as the
|
||||||
@ -20,7 +21,7 @@ def main():
|
|||||||
|
|
||||||
# Register a blueprint
|
# Register a blueprint
|
||||||
app.register_blueprint(blueprint)
|
app.register_blueprint(blueprint)
|
||||||
app.run(debug=True)
|
app.run(debug=True, host="0.0.0.0")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
@ -11,3 +11,11 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- '9000:9000'
|
- '9000:9000'
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
wmgzon:
|
||||||
|
container_name: "wmgzon"
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "5000:5000"
|
||||||
|
volumes:
|
||||||
|
- .:/code
|
7
dockerfile
Normal file
7
dockerfile
Normal 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" ]
|
0
scripts/create_database.sh
Normal file
0
scripts/create_database.sh
Normal file
0
scripts/run_tests.sh
Normal file
0
scripts/run_tests.sh
Normal file
Loading…
Reference in New Issue
Block a user