Adding wordpress app.

This commit is contained in:
2026-07-04 12:54:54 -07:00
parent 422d2a38d2
commit e62593bf44
11 changed files with 206 additions and 2 deletions

View File

@@ -45,6 +45,7 @@ insert into apps(app_name) values ('nassella');
insert into apps(app_name) values ('log-viewer');
insert into apps(app_name) values ('ghost');
insert into apps(app_name) values ('instance-control');
insert into apps(app_name) values ('wordpress');
create table user_selected_apps(
id bigserial primary key,
@@ -117,3 +118,4 @@ insert into migrations(migration_id) values(1);
insert into migrations(migration_id) values(2);
insert into migrations(migration_id) values(3);
insert into migrations(migration_id) values(4);
insert into migrations(migration_id) values(5);

View File

@@ -625,7 +625,8 @@ where user_id=$1;"
(1 . "adding-service-config-digitalocean-volume-size")
(2 . "adding-deployments-instance-backup")
(3 . "normalizing-apps")
(4 . "fixing-app-normalization")))
(4 . "fixing-app-normalization")
(5 . "adding-wordpress-app")))
(define (run-pending-migrations conn)
(let* ((migration-ids (sort (map car *migrations*) <))

View File

@@ -0,0 +1 @@
insert into apps(app_name) values('wordpress');

View File

@@ -1111,6 +1111,7 @@ chmod -R 777 /opt/keys")))
`((Field (@ (name "nassella") (type "checkbox") (label ("Nassella")) (checked ,(member 'nassella (alist-ref 'selected-apps results)))))))
(else
'()))
(Field (@ (name "wordpress") (type "checkbox") (label ("wordpress")) (checked ,(member 'wordpress (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?
@@ -1129,6 +1130,7 @@ chmod -R 777 /opt/keys")))
(nextcloud . ,(or (and (alist-ref 'nextcloud (current-params)) "34") #f))
(ghost . ,(or (and (alist-ref 'ghost (current-params)) "6") #f))
(nassella . ,(or (and (alist-ref 'nassella (current-params)) "b0.0.1") #f))
(wordpress . ,(or (and (alist-ref 'wordpress (current-params)) "8.4") #f))
(instance-control . "b0.0.1")
(log-viewer . "20"))))
(update-root-domain db
@@ -1187,6 +1189,11 @@ chmod -R 777 /opt/keys")))
(Field (@ (name "nassella-stripe-api-key") (label ("Stripe API Key")) (type "password")
(value ,(alist-ref 'stripe-api-key (alist-ref 'nassella app-config eq? '()) eq? ""))))))
'())
,@(if (member 'wordpress selected-apps)
`((Fieldset
(@ (title "Wordpress"))
(Field (@ (name "wordpress-subdomain") (label ("Subdomain")) (value ,(alist-ref 'subdomain (alist-ref 'wordpress app-config eq? '()) eq? "wordpress"))))))
'())
(Fieldset
(@ (title "Log Viewer"))
(Field (@ (name "log-viewer-subdomain") (label ("Subdomain"))
@@ -1262,6 +1269,13 @@ chmod -R 777 /opt/keys")))
(authelia-key-seed . ,(or (alist-ref 'authelia-key-seed
(alist-ref 'nassella config eq? '()))
(generate-authelia-key-seed)))))
(wordpress . ((subdomain . ,(alist-ref 'wordpress-subdomain (current-params)))
(db-password . ,(or (alist-ref 'db-password
(alist-ref 'wordpress config eq? '()))
(generate-postgres-password)))
(db-root-password . ,(or (alist-ref 'db-root-password
(alist-ref 'wordpress config eq? '()))
(generate-postgres-password)))))
(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)))))
@@ -1463,6 +1477,8 @@ chmod -R 777 /opt/keys")))
("NASSELLA_STRIPE_API_KEY" . ,(alist-ref 'stripe-api-key (alist-ref 'nassella config)))
("NASSELLA_AUTHELIA_JWT_SECRET" . ,(alist-ref 'authelia-jwt-secret (alist-ref 'nassella config)))
("NASSELLA_AUTHELIA_KEY_SEED" . ,(alist-ref 'authelia-key-seed (alist-ref 'nassella config)))
("WORDPRESS_DB_PASSWORD" . ,(alist-ref 'db-password (alist-ref 'wordpress config)))
("WORDPRESS_DB_ROOT_PASSWORD" . ,(alist-ref 'db-root-password (alist-ref 'wordpress config)))
("SMTP_HOST" . ,(alist-ref 'smtp-host (alist-ref 'all-apps config)))
("SMTP_PORT" . ,(alist-ref 'smtp-port (alist-ref 'all-apps config)))
("SMTP_AUTH_USER" . ,(alist-ref 'smtp-auth-user (alist-ref 'all-apps config)))