init
This commit is contained in:
17
build-deb/Makefile
Normal file
17
build-deb/Makefile
Normal 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/
|
11
build-deb/flaskapp/DEBIAN/control
Normal file
11
build-deb/flaskapp/DEBIAN/control
Normal 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
|
3
build-deb/flaskapp/DEBIAN/postinst
Executable file
3
build-deb/flaskapp/DEBIAN/postinst
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
/usr/bin/systemctl enable flaskapp.service
|
||||
/sbin/service flaskapp start
|
3
build-deb/flaskapp/DEBIAN/prerm
Executable file
3
build-deb/flaskapp/DEBIAN/prerm
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
/sbin/service flaskapp stop
|
||||
/usr/bin/systemdctl disable flaskapp.service
|
12
build-deb/flaskapp/lib/systemd/system/freeriders.service
Normal file
12
build-deb/flaskapp/lib/systemd/system/freeriders.service
Normal 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
|
||||
|
21
build-deb/man/flaskapp.1.md
Normal file
21
build-deb/man/flaskapp.1.md
Normal 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.
|
||||
|
Reference in New Issue
Block a user