This commit is contained in:
2023-10-20 15:20:56 +02:00
commit 22c6084863
19 changed files with 705 additions and 0 deletions

17
build-deb/Makefile Normal file
View File

@@ -0,0 +1,17 @@
all: man deb
man: man/flaskapp.1.md
pandoc man/flaskapp.1.md -f markdown+hard_line_breaks -s -t man -o man/flaskapp.1
cp man/flaskapp.1 flaskapp/usr/share/man/man1/
gzip -f flaskapp/usr/share/man/man1/flaskapp.1
deb: man ../requirments.txt ../run.py ../flaskapp ../LICENSE
cp -r ../flaskapp/* flaskapp/var/flaskapp/flaskapp/
cp ../run.py flaskapp/var/flaskapp/
cp ../LICENSE flaskapp/var/flaskapp/
dpkg-deb --build flaskapp
clean:
rm -f flaskapp.deb
rm -f man/flaskapp.1
rm -rf flaskapp/var
mkdir -p flaskapp/var/flaskapp/flaskapp
mkdir -p flaskapp/usr/share/man/man1/

View File

@@ -0,0 +1,11 @@
Package: flaskapp
Section: net
Priority: optional
Architecture: all
Essential: no
Installed-Size: 2000
Depends: gunicorn, python3-flask-sqlalchemy
Homepage: https://gitea.dmz.rs/Decentrala/flaskapp
Maintainer: Decentrala <dmz@dmz.rs>
Description: Web app
Version: 1.0.0

View File

@@ -0,0 +1,3 @@
#!/bin/sh
/usr/bin/systemctl enable flaskapp.service
/sbin/service flaskapp start

View File

@@ -0,0 +1,3 @@
#!/bin/sh
/sbin/service flaskapp stop
/usr/bin/systemdctl disable flaskapp.service

View File

@@ -0,0 +1,12 @@
[Unit]
Description=Gunicorn flaskapp service
Documentation=man:gunicorn(1)
After=network.target nss-lookup.target
[Service]
WorkingDirectory=/var/flaskapp/
ExecStart=/usr/bin/gunicorn --workers 3 --bind 127.0.0.1:5000 run:app
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,21 @@
% FLASKAPP(1) flaskapp 1.0.0
% Decentrala
% Jun 2023
# NAME
flaskapp - Web app
# SYNOPSIS
**python3 run.py**
# DESCRIPTION
Web app
# AUTHORS
Decentrala
# COPYRIGHT
**AGPLv3+**: GNU AGPL version 3 <https://gnu.org/licenses/agpl.html>
This is *free* software: you are free to change and redistribute it.
There is **NO WARRANTY**, to the extent permitted by law.