Working nassella running on nassella!!
This commit is contained in:
@@ -30,7 +30,8 @@
|
||||
intarweb
|
||||
nassella-db
|
||||
sql-null
|
||||
openssl)
|
||||
openssl
|
||||
spiffy)
|
||||
|
||||
(define app (schematra/make-app))
|
||||
|
||||
@@ -716,12 +717,15 @@ chmod -R 777 /opt/keys"))
|
||||
(receive (wait-pid exit-normal status) (process-wait pid #t)
|
||||
(if (= wait-pid 0) ;; wait-pid is 0 until the process has finished
|
||||
(loop)
|
||||
(let ((priv-key (with-input-from-file (conc key-path "/key") read-string))
|
||||
(pub-key (with-input-from-file (conc key-path "/key.pub") read-string)))
|
||||
(with-input-from-port in-port read-string) ;; left here for debugging and to clear ports
|
||||
(with-input-from-port err-port read-string) ;; left here for debugging and to clear ports
|
||||
(delete-directory key-path #t)
|
||||
(list priv-key pub-key)))))))))
|
||||
(if exit-normal
|
||||
(begin
|
||||
(with-input-from-port in-port read-string) ;; left here for debugging and to clear ports
|
||||
(with-input-from-port err-port read-string) ;; left here for debugging and to clear ports
|
||||
(let ((priv-key (with-input-from-file (conc key-path "/key") read-string))
|
||||
(pub-key (with-input-from-file (conc key-path "/key.pub") read-string)))
|
||||
(delete-directory key-path #t)
|
||||
(list priv-key pub-key)))
|
||||
(error "Generating ssh key docker command had abnormal exit")))))))))
|
||||
(thread-join! thread)))))
|
||||
|
||||
(define (generate-restic-password)
|
||||
@@ -885,6 +889,7 @@ chmod -R 777 /opt/keys"))
|
||||
(Field (@ (name "wg-easy") (type "checkbox") (label ("WG Easy")) (checked ,(member 'wg-easy (alist-ref 'selected-apps results)))))
|
||||
(Field (@ (name "nextcloud") (type "checkbox") (label ("NextCloud")) (checked ,(member 'nextcloud (alist-ref 'selected-apps results)))))
|
||||
(Field (@ (name "ghost") (type "checkbox") (label ("Ghost")) (checked ,(member 'ghost (alist-ref 'selected-apps results)))))
|
||||
(Field (@ (name "nassella") (type "checkbox") (label ("Nassella")) (checked ,(member 'nassella (alist-ref 'selected-apps results)))))
|
||||
(Field (@ (name "log-viewer") (type "checkbox") (label ("Log Viewer")) (checked #t) (disabled "disabled"))))
|
||||
;; TODO add config for when automatic upgrades are scheduled for?
|
||||
;; TODO add config for server timezone?
|
||||
@@ -900,7 +905,8 @@ chmod -R 777 /opt/keys"))
|
||||
instance-id
|
||||
`((wg-easy . ,(or (and (alist-ref 'wg-easy (current-params)) "15.1.0") (sql-null)))
|
||||
(nextcloud . ,(or (and (alist-ref 'nextcloud (current-params)) "31.0.8") (sql-null)))
|
||||
(ghost . ,(or (and (alist-ref 'ghost (current-params)) "6.10.0") (sql-null)))))
|
||||
(ghost . ,(or (and (alist-ref 'ghost (current-params)) "6.10.0") (sql-null)))
|
||||
(nassella . ,(or (and (alist-ref 'nassella (current-params)) "b0.0.1") (sql-null)))))
|
||||
(update-root-domain db
|
||||
(session-user-id)
|
||||
instance-id
|
||||
@@ -948,6 +954,11 @@ chmod -R 777 /opt/keys"))
|
||||
(Field (@ (name "nextcloud-admin-password") (label ("Admin Password")) (type "password")
|
||||
(value ,(alist-ref 'admin-password (alist-ref 'nextcloud app-config eq? '()) eq? ""))))))
|
||||
'())
|
||||
,@(if (member 'nassella selected-apps)
|
||||
`((Fieldset
|
||||
(@ (title "Nassella"))
|
||||
(Field (@ (name "nassella-subdomain") (label ("Subdomain")) (value ,(alist-ref 'subdomain (alist-ref 'nassella app-config eq? '()) eq? "nassella"))))))
|
||||
'())
|
||||
(Fieldset
|
||||
(@ (title "Log Viewer"))
|
||||
(Field (@ (name "log-viewer-subdomain") (label ("Subdomain"))
|
||||
@@ -998,6 +1009,7 @@ chmod -R 777 /opt/keys"))
|
||||
(redis-password . ,(or (alist-ref 'redis-password
|
||||
(alist-ref 'nextcloud config eq? '()))
|
||||
(generate-redis-password)))))
|
||||
(nassella . ((subdomain . ,(alist-ref 'nassella-subdomain (current-params)))))
|
||||
(log-viewer . ((subdomain . ,(alist-ref 'log-viewer-subdomain (current-params)))
|
||||
(user . ,(alist-ref 'log-viewer-user (current-params)))
|
||||
(password . ,(alist-ref 'log-viewer-password (current-params)))))
|
||||
@@ -1190,7 +1202,8 @@ chmod -R 777 /opt/keys"))
|
||||
("cloudflare_account_id" . ,(alist-ref 'cloudflare-account-id service-config))
|
||||
("cluster_name" . "mycluster")
|
||||
("datacenter" . ,(alist-ref 'digitalocean-region service-config))
|
||||
("flatcar_stable_version" . "4459.2.1")))
|
||||
;; (source <(curl -sSfL https://stable.release.flatcar-linux.net/amd64-usr/current/version.txt); echo "${FLATCAR_VERSION_ID}")
|
||||
("flatcar_stable_version" . "4459.2.3")))
|
||||
;; remove the newline that generating the ssh key adds
|
||||
(display "ssh_keys=[\"") (display (string-drop-right ssh-pub-key 1)) (print "\"]"))))
|
||||
(let* ((instance-id (alist-ref "id" (current-params) equal?))
|
||||
@@ -1324,6 +1337,7 @@ chmod -R 777 /opt/keys"))
|
||||
'((wg-easy . "https://wg-easy.github.io/wg-easy/Pre-release/")
|
||||
(nextcloud . "https://nextcloud.com/support/")
|
||||
(ghost . "https://nextcloud.com/support/")
|
||||
(nassella . "https://nextcloud.com/support/")
|
||||
(log-viewer . "https://nextcloud.com/support/")))))
|
||||
(h3 "Actions")
|
||||
(ul (li (a (@ (href "/config/wizard/services/"
|
||||
|
||||
Reference in New Issue
Block a user