- commit
- 42e8757c518e7f4612c5ad7fd2599db973722688
- parent
- 299906ea3a56b53084ed7db2d9fff62360233582
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2020-07-25 15:25
deployment
Diffstat
| A | PKGBUILD | 16 | ++++++++++++++++ |
| A | neddit.nginx | 19 | +++++++++++++++++++ |
| A | neddit.service | 15 | +++++++++++++++ |
3 files changed, 50 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
@@ -0,0 +1,16 @@
-1 1 pkgname='neddit'
-1 2 pkgdesc='the frontend of the frontpage of the internet'
-1 3 arch=('amd64')
-1 4 url='https://github.com/xi/neddit'
-1 5 license='MIT'
-1 6 depends=('gunicorn3' 'python3-requests' 'python3-jinja2' 'python3-flask')
-1 7
-1 8 package() {
-1 9 mkdir -p "$pkgdir/opt/neddit/templates/"
-1 10 mkdir -p "$pkgdir/opt/neddit/static/"
-1 11 install -m 644 neddit.py "$pkgdir/opt/neddit/neddit.py"
-1 12 install -m 644 templates/* "$pkgdir/opt/neddit/templates/"
-1 13 install -m 644 static/* "$pkgdir/opt/neddit/static/"
-1 14 install -D -m 644 neddit.service "$pkgdir/lib/systemd/system/neddit.service"
-1 15 install -D -m 644 neddit.nginx "$pkgdir/etc/nginx/sites-available/neddit"
-1 16 }
diff --git a/neddit.nginx b/neddit.nginx
@@ -0,0 +1,19 @@
-1 1 server {
-1 2 server_name _;
-1 3
-1 4 listen [::]:80;
-1 5 listen 80;
-1 6
-1 7 location / {
-1 8 proxy_pass http://localhost:8006;
-1 9 }
-1 10
-1 11 location ^~ /static/ {
-1 12 include /etc/nginx/mime.types;
-1 13 root /opt/neddit/;
-1 14 }
-1 15
-1 16 location /favicon.ico {
-1 17 return 404;
-1 18 }
-1 19 }
diff --git a/neddit.service b/neddit.service
@@ -0,0 +1,15 @@ -1 1 [Unit] -1 2 Description=neddit -1 3 After=network.target -1 4 -1 5 [Service] -1 6 Type=simple -1 7 ExecStart=gunicorn3 -w 2 neddit:app -b localhost:8006 -1 8 Restart=always -1 9 WorkingDirectory=/opt/neddit/ -1 10 DynamicUser=true -1 11 ProtectSystem=full -1 12 ProtectHome=yes -1 13 -1 14 [Install] -1 15 WantedBy=multi-user.target