mirror of
https://github.com/ION606/static-site-hosting.git
synced 2026-05-14 22:16:54 +00:00
docker too annoying, switched to nohup
This commit is contained in:
@@ -1,18 +1,17 @@
|
|||||||
all: build run
|
all: run
|
||||||
|
|
||||||
build:
|
|
||||||
docker build -t static-sites .
|
|
||||||
|
|
||||||
run:
|
run:
|
||||||
docker run -d -p 5121:5121 \
|
nohup .venv/bin/python app.py > output.log 2>&1 & echo $! > app.pid
|
||||||
-v $(PWD)/templates:/app/templates \
|
|
||||||
-v $(PWD)/static:/app/static \
|
|
||||||
-v $(PWD)/sites:/app/sites \
|
|
||||||
-v $(PWD)/db.sqlite:/app/db.sqlite \
|
|
||||||
--name static_sites static-sites
|
|
||||||
|
|
||||||
stop:
|
stop:
|
||||||
docker stop static_sites || true
|
kill -9 $(cat app.pid) || true
|
||||||
|
rm -f app.pid
|
||||||
|
|
||||||
|
restart: stop run
|
||||||
|
|
||||||
|
logs:
|
||||||
|
tail -f output.log
|
||||||
|
|
||||||
clean: stop
|
clean: stop
|
||||||
docker rm static_sites || true
|
rm -f output.log
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
Traceback (most recent call last):
|
||||||
|
File "/home/ion606/misc-code/static-site-hosting/app.py", line 1, in <module>
|
||||||
|
from flask import (
|
||||||
|
...<9 lines>...
|
||||||
|
)
|
||||||
|
ModuleNotFoundError: No module named 'flask'
|
||||||
Reference in New Issue
Block a user