diff --git a/kulupu/services/activity-pub.scm b/kulupu/services/activity-pub.scm index 46a35e5..800c464 100644 --- a/kulupu/services/activity-pub.scm +++ b/kulupu/services/activity-pub.scm @@ -17,26 +17,31 @@ make-gts-config gts-config? (pkg gotosocial-configuration-package (default gotosocial)) + (front-end gotosocial-configuration-frontend-package (default gotosocial-frontend)) (config-file gotosocial-configuration-config (default #f)) ; file-like (port gotosocial-port (default #f)) (cert-dir gotosocial-letsencrypt-cert-dir (default #f)) (storage-dir gotosocial-storage-local-base-path (default #f)) (web-asset-dir gotosocial-web-asset-dir (default #f)) + (web-template-dir gotosocial-template-asset-dir (default #f)) (host gotosocial-host (default #f)) (db-type gotosocial-db-type (default #f)) (db-address gotosocial-db-address (default #f))) (define gotosocial-shepherd-service - (match-lambda (($ pkg config-file port cert-dir storage-dir web-asset-dir host db-type db-address) - (let* ((gotosocial (file-append pkg "/bin/gotosocial")) - (command `(,gotosocial - "server" "start" + (match-lambda (($ pkg front-end config-file port cert-dir storage-dir web-asset-dir web-template-dir host db-type db-address) + (let* ((gts (file-append pkg "/bin/gotosocial")) + (gts-frontend-assets (file-append front-end "/gotosocial/web/assets")) + (gts-frontend-templates (file-append front-end "/gotosocial/web/template")) + (command `(,gts + "server" "start" "--syslog-enabled" ,@(if port `(,(string-append "--port=" (number->string port))) '()) ,@(if db-type `(,(string-append "--db-type=" db-type)) '()) ,@(if db-address `(,(string-append "--db-address=" db-address)) '()) ,@(if cert-dir `(,(string-append "--letsencrypt-cert-dir=" cert-dir)) '()) ,@(if storage-dir `(,(string-append "--storage-local-base-path=" storage-dir)) '()) - ,@(if web-asset-dir `(,(string-append "--letsencrypt-cert-dir=" web-asset-dir)) '()) + ,@(if web-asset-dir `(,(string-append "--web-asset-base-dir=" web-asset-dir)) '(,(string-append "--web-asset-base-dir=" gts-frontend-assets))) + ,@(if web-template-dir `(,(string-append "--web-template-base-dir=" web-template-dir)) '(,(string-append "--web-template-base-dir=" gts-frontend-templates))) ,@(if config-file `(,(string-append "--config-path=" config-file)) '()) ,@(if host `(,(string-append "--host=" host)) '()) )))