mirror of
https://github.com/runyanjake/jakeswestcoast.git
synced 2025-10-04 15:27:29 -07:00
Convert to Flask and dockerize.
This commit is contained in:
parent
5480ac5a3a
commit
6192850b33
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
FROM python:3.10-slim
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
EXPOSE 5000
|
||||||
|
|
||||||
|
ENV FLASK_APP=app.py
|
||||||
|
ENV FLASK_ENV=development
|
||||||
|
|
||||||
|
CMD ["flask", "run", "--host=0.0.0.0"]
|
12
app.py
Normal file
12
app.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from flask import Flask, render_template
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/')
|
||||||
|
def index():
|
||||||
|
return render_template('index.html')
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
app.run(debug=True)
|
17
docker-compose.yml
Normal file
17
docker-compose.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
networks:
|
||||||
|
traefik:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
jakeswestcoast:
|
||||||
|
container_name: jakeswestcoast
|
||||||
|
networks:
|
||||||
|
- traefik
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "5000:5000"
|
||||||
|
labels:
|
||||||
|
- traefik.http.routers.league.rule=Host(`jakeswestcoast.com`) || Host(`www.jakeswestcoast.com`)
|
||||||
|
- traefik.http.routers.league.tls=true
|
||||||
|
- traefik.http.routers.league.tls.certresolver=lets-encrypt
|
||||||
|
- traefik.http.services.downloads.loadbalancer.server.port=5000
|
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Flask==3.0.3
|
||||||
|
|
@ -3,3 +3,4 @@
|
|||||||
* @author Jake Runyan
|
* @author Jake Runyan
|
||||||
* @desc Main CSS
|
* @desc Main CSS
|
||||||
*//*************************************************/
|
*//*************************************************/
|
||||||
|
|
Before Width: | Height: | Size: 654 KiB After Width: | Height: | Size: 654 KiB |
Loading…
x
Reference in New Issue
Block a user