Add CI and related fixes #1
4 changed files with 11 additions and 11 deletions
|
|
@ -5,6 +5,6 @@ WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 8000
|
||||||
|
|
||||||
CMD ["python", "app.py"]
|
CMD ["python", "-m", "gunicorn", "app:app"]
|
||||||
|
|
|
||||||
9
app.py
9
app.py
|
|
@ -1,18 +1,17 @@
|
||||||
from flask import Flask, send_from_directory
|
from flask import Flask, send_from_directory
|
||||||
import os
|
|
||||||
|
|
||||||
app = Flask(__name__, static_folder='static', static_url_path='/static')
|
app = Flask(__name__, static_folder='static', static_url_path='/static')
|
||||||
|
|
||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def index():
|
def index():
|
||||||
return send_from_directory('static', 'index.html')
|
return send_from_directory('static', 'index.html')
|
||||||
|
|
||||||
# Serve static files
|
|
||||||
@app.route('/<path:filename>')
|
@app.route('/<path:filename>')
|
||||||
def static_files(filename):
|
def static_files(filename):
|
||||||
return send_from_directory('static', filename)
|
return send_from_directory('static', filename)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import sys
|
app.run(debug=True, host='0.0.0.0', port=5000)
|
||||||
port = int(sys.argv[1]) if len(sys.argv) > 1 else 5000
|
|
||||||
app.run(debug=True, host='0.0.0.0', port=port)
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,3 @@
|
||||||
flask
|
flask
|
||||||
requests
|
gunicorn
|
||||||
|
requests
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>OpenAI Models Viewer</title>
|
<title>OpenAI Models Viewer</title>
|
||||||
<link rel="stylesheet" href="/static/style.css">
|
<link rel="stylesheet" href="style.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
@ -91,6 +91,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/script.js"></script>
|
<script src="script.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue