🗝
summary refs log tree commit diff
diff options
context:
space:
mode:
authormia <mia@mia.jetzt>2024-09-15 10:22:38 -0700
committermia <mia@mia.jetzt>2024-09-15 10:22:38 -0700
commitb03cc5fff29d7741895480cd83d63d867a8e5bec (patch)
tree06df5865d1d1b175f247ee115abe41f346d2d9f6
parent3b8f8f8fe4fe8e41e91ece2fa284dc940278f6af (diff)
downloadasylum-b03cc5fff29d7741895480cd83d63d867a8e5bec.tar.gz
asylum-b03cc5fff29d7741895480cd83d63d867a8e5bec.zip
add akkoma-fe to outskirts.town
-rw-r--r--nginx/nginx.conf26
-rw-r--r--packages/aur.ini2
-rw-r--r--packages/iceshrimp.net-akkoma-fe-git/.gitignore2
-rw-r--r--packages/iceshrimp.net-akkoma-fe-git/PKGBUILD49
4 files changed, 78 insertions, 1 deletions
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
index 6a091b1..0137b11 100644
--- a/nginx/nginx.conf
+++ b/nginx/nginx.conf
@@ -145,4 +145,30 @@ http {
             proxy_set_header Connection $connection_upgrade;
         }
     }
+
+    # outskirts akkoma-fe
+    server {
+        listen 80;
+        listen [::]:80;
+        server_name ak.outskirts.town;
+
+        location / {
+            root /usr/share/iceshrimp.net/akkoma-fe;
+            index index.html;
+            try_files $uri /index.html =404;
+        }
+
+        location ^~ /oauth/authorize {
+            return 307 https://outskirts.town$request_uri;
+        }
+
+        location ~* ^/(api|oauth|nodeinfo)/ {
+            proxy_pass http://localhost:6502;
+            proxy_http_version 1.1;
+            proxy_redirect off;
+            proxy_set_header Host outskirts.town;
+            proxy_set_header Upgrade $http_upgrade;
+            proxy_set_header Connection $connection_upgrade;
+        }
+    }
 }
diff --git a/packages/aur.ini b/packages/aur.ini
index 04ee4f2..135c609 100644
--- a/packages/aur.ini
+++ b/packages/aur.ini
@@ -1,6 +1,6 @@
 cgit-pink = 87afbcd732af921d9127cbbbe4aeb8f823f72d97
 fw-ectool-git = r2763.0ac6155
-iceshrimp.net-git = 2024.1.beta2.r165.gc162f5b
+iceshrimp.net-git = 2024.1.beta3.patch1.r61.g162ddd49
 
 ; searxng deps
 python-fasttext-predict = 043cd051e2e43ba72a9776745fde07bbb290d44a
diff --git a/packages/iceshrimp.net-akkoma-fe-git/.gitignore b/packages/iceshrimp.net-akkoma-fe-git/.gitignore
new file mode 100644
index 0000000..b40d819
--- /dev/null
+++ b/packages/iceshrimp.net-akkoma-fe-git/.gitignore
@@ -0,0 +1,2 @@
+/akkoma-fe/
+/*.pkg.*
diff --git a/packages/iceshrimp.net-akkoma-fe-git/PKGBUILD b/packages/iceshrimp.net-akkoma-fe-git/PKGBUILD
new file mode 100644
index 0000000..6335a3b
--- /dev/null
+++ b/packages/iceshrimp.net-akkoma-fe-git/PKGBUILD
@@ -0,0 +1,49 @@
+pkgname=iceshrimp.net-akkoma-fe-git
+pkgver=3.10.0.92d3cd4d
+pkgrel=1
+license=(AGPL)
+arch=(any)
+makedepends=(nodejs)
+source=(akkoma-fe::git+https://iceshrimp.dev/iceshrimp/akkoma-fe.git)
+sha256sums=(SKIP)
+
+pkgver() {
+  cd akkoma-fe
+  echo "$(jq -r '.version' package.json).$(git rev-parse --short HEAD)"
+}
+
+build() {
+  cd akkoma-fe
+  corepack yarn
+  corepack yarn build
+}
+
+take-static() {
+  mv "$srcdir/akkoma-fe/dist/static/$1" "$srcdir/$1"
+}
+
+put-static() {
+  ln -s "/etc/iceshrimp.net/akkoma-fe/$1" "$pkgdir/usr/share/iceshrimp.net/akkoma-fe/static/$1"
+  install -Dm644 "$srcdir/$1" "$pkgdir/etc/iceshrimp.net/akkoma-fe/$1"
+}
+
+package() {
+  install -dm644 "$pkgdir/usr/share/iceshrimp.net/akkoma-fe/static"
+
+  # split out configurables into /etc
+  install -dm755 "$pkgdir/etc/iceshrimp.net/akkoma-fe"
+
+  take-static terms-of-service.html
+  sed -i 's|$STATIC_DIR/static/terms-of-service.html|/etc/iceshrimp.net/akkoma-fe/terms-of-service.html|' "$srcdir/terms-of-service.html"
+  put-static terms-of-service.html
+
+  take-static config.json && put-static config.json
+  take-static styles.json && put-static styles.json
+
+  take-static custom.css
+  sed -i 's|$static_dir/static/custom.css|/etc/iceshrimp.net/akkoma-fe/custom.css|' "$srcdir/custom.css"
+  put-static custom.css
+
+  # install compiled artifacts
+  cp -dpTr --no-preserve=ownership "$srcdir/akkoma-fe/dist" "$pkgdir/usr/share/iceshrimp.net/akkoma-fe"
+}