From 97f561857932625c487edb14f4224171ce1965ea Mon Sep 17 00:00:00 2001 From: ION606 Date: Sun, 16 Feb 2025 16:38:34 -0500 Subject: [PATCH] docker too annoying, switched to nohup --- Makefile | 23 +++++++++++------------ app.pid | 1 + nohup.out | 6 ++++++ output.log | 0 4 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 app.pid create mode 100644 nohup.out create mode 100644 output.log diff --git a/Makefile b/Makefile index 0d1d942..9b9508b 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,17 @@ -all: build run - -build: - docker build -t static-sites . +all: run run: - docker run -d -p 5121:5121 \ - -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 + nohup .venv/bin/python app.py > output.log 2>&1 & echo $! > app.pid 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 - docker rm static_sites || true + rm -f output.log + diff --git a/app.pid b/app.pid new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/app.pid @@ -0,0 +1 @@ + diff --git a/nohup.out b/nohup.out new file mode 100644 index 0000000..9fe237c --- /dev/null +++ b/nohup.out @@ -0,0 +1,6 @@ +Traceback (most recent call last): + File "/home/ion606/misc-code/static-site-hosting/app.py", line 1, in + from flask import ( + ...<9 lines>... + ) +ModuleNotFoundError: No module named 'flask' diff --git a/output.log b/output.log new file mode 100644 index 0000000..e69de29