forked from Decentrala/taskmanager
create taskmanager repo
This commit is contained in:
parent
22c6084863
commit
872e0e2416
@ -1,17 +1,17 @@
|
|||||||
all: man deb
|
all: man deb
|
||||||
|
|
||||||
man: man/flaskapp.1.md
|
man: man/taskmanager.1.md
|
||||||
pandoc man/flaskapp.1.md -f markdown+hard_line_breaks -s -t man -o man/flaskapp.1
|
pandoc man/taskmanager.1.md -f markdown+hard_line_breaks -s -t man -o man/taskmanager.1
|
||||||
cp man/flaskapp.1 flaskapp/usr/share/man/man1/
|
cp man/taskmanager.1 taskmanager/usr/share/man/man1/
|
||||||
gzip -f flaskapp/usr/share/man/man1/flaskapp.1
|
gzip -f taskmanager/usr/share/man/man1/taskmanager.1
|
||||||
deb: man ../requirments.txt ../run.py ../flaskapp ../LICENSE
|
deb: man ../requirments.txt ../run.py ../taskmanager ../LICENSE
|
||||||
cp -r ../flaskapp/* flaskapp/var/flaskapp/flaskapp/
|
cp -r ../taskmanager/* taskmanager/var/taskmanager/taskmanager/
|
||||||
cp ../run.py flaskapp/var/flaskapp/
|
cp ../run.py taskmanager/var/taskmanager/
|
||||||
cp ../LICENSE flaskapp/var/flaskapp/
|
cp ../LICENSE taskmanager/var/taskmanager/
|
||||||
dpkg-deb --build flaskapp
|
dpkg-deb --build taskmanager
|
||||||
clean:
|
clean:
|
||||||
rm -f flaskapp.deb
|
rm -f taskmanager.deb
|
||||||
rm -f man/flaskapp.1
|
rm -f man/taskmanager.1
|
||||||
rm -rf flaskapp/var
|
rm -rf taskmanager/var
|
||||||
mkdir -p flaskapp/var/flaskapp/flaskapp
|
mkdir -p taskmanager/var/taskmanager/taskmanager
|
||||||
mkdir -p flaskapp/usr/share/man/man1/
|
mkdir -p taskmanager/usr/share/man/man1/
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
/usr/bin/systemctl enable flaskapp.service
|
|
||||||
/sbin/service flaskapp start
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
/sbin/service flaskapp stop
|
|
||||||
/usr/bin/systemdctl disable flaskapp.service
|
|
@ -1,12 +0,0 @@
|
|||||||
[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
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
|||||||
% FLASKAPP(1) flaskapp 1.0.0
|
% FLASKAPP(1) taskmanager 1.0.0
|
||||||
% Decentrala
|
% Decentrala
|
||||||
% Jun 2023
|
% Jun 2023
|
||||||
|
|
||||||
# NAME
|
# NAME
|
||||||
flaskapp - Web app
|
taskmanager - Web app
|
||||||
|
|
||||||
# SYNOPSIS
|
# SYNOPSIS
|
||||||
**python3 run.py**
|
**python3 run.py**
|
@ -1,11 +1,11 @@
|
|||||||
Package: flaskapp
|
Package: taskmanager
|
||||||
Section: net
|
Section: net
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Essential: no
|
Essential: no
|
||||||
Installed-Size: 2000
|
Installed-Size: 2000
|
||||||
Depends: gunicorn, python3-flask-sqlalchemy
|
Depends: gunicorn, python3-flask-sqlalchemy
|
||||||
Homepage: https://gitea.dmz.rs/Decentrala/flaskapp
|
Homepage: https://gitea.dmz.rs/Decentrala/taskmanager
|
||||||
Maintainer: Decentrala <dmz@dmz.rs>
|
Maintainer: Decentrala <dmz@dmz.rs>
|
||||||
Description: Web app
|
Description: Web app
|
||||||
Version: 1.0.0
|
Version: 1.0.0
|
3
build-deb/taskmanager/DEBIAN/postinst
Executable file
3
build-deb/taskmanager/DEBIAN/postinst
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
/usr/bin/systemctl enable taskmanager.service
|
||||||
|
/sbin/service taskmanager start
|
3
build-deb/taskmanager/DEBIAN/prerm
Executable file
3
build-deb/taskmanager/DEBIAN/prerm
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
/sbin/service taskmanager stop
|
||||||
|
/usr/bin/systemdctl disable taskmanager.service
|
@ -5,7 +5,7 @@ import os # if you wanna have db credenitalas in os.environ
|
|||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
# SQLAlchemy setup
|
# SQLAlchemy setup
|
||||||
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///flaskapp.db'
|
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///taskmanager.db'
|
||||||
|
|
||||||
#MySql setup
|
#MySql setup
|
||||||
#app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://user:pass@localhost/dbname'
|
#app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://user:pass@localhost/dbname'
|
||||||
@ -13,4 +13,4 @@ app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///flaskapp.db'
|
|||||||
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
||||||
db = SQLAlchemy(app)
|
db = SQLAlchemy(app)
|
||||||
|
|
||||||
from flaskapp import routes
|
from taskmanager import routes
|
@ -1,4 +1,4 @@
|
|||||||
from flaskapp import db
|
from taskmanager import db
|
||||||
|
|
||||||
class Table(db.Model):
|
class Table(db.Model):
|
||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
@ -1,7 +1,7 @@
|
|||||||
from flask import render_template, request, redirect
|
from flask import render_template, request, redirect
|
||||||
from flaskapp import app, db
|
from taskmanager import app, db
|
||||||
from flaskapp.functions import *
|
from taskmanager.functions import *
|
||||||
from flaskapp.models import *
|
from taskmanager.models import *
|
||||||
|
|
||||||
@app.route('/', methods=['GET'])
|
@app.route('/', methods=['GET'])
|
||||||
def index():
|
def index():
|
Loading…
Reference in New Issue
Block a user