Guestbook for my homepage
Go to file
2023-07-26 12:29:18 -04:00
assets Impelement hyperlinking of individual message IDs 2022-04-06 22:44:05 -04:00
lib/GuestbookNg/Model Whoopsie 2022-12-07 00:07:07 -06:00
migrations Change the schema 2022-02-09 21:02:35 -05:00
public Add favicon 2022-07-21 20:58:56 -04:00
t Revert "Revert "Only need the first few messages for this test"" 2022-07-26 22:09:36 -04:00
templates Add verification links 2022-11-20 14:32:48 -05:00
.gitignore Implemented the Webhook request; all my URL gone 2022-07-22 00:49:33 -04:00
cpanfile Add this dependency for building with Perl v5.36 2022-07-22 12:56:08 -04:00
Dockerfile Upgrade Perl and copy the Webhook URL 2022-07-22 01:11:17 -04:00
example.tom.url Added webhook URL dotfiles and module for the webhook requests 2022-07-21 23:45:03 -04:00
guestbook-ng.pl Implement uh... try/catch sorta 2022-07-22 13:10:18 -04:00
LICENSE Initial commit++ 2021-12-04 00:11:37 -05:00
README.md Update docs 2023-07-26 12:29:18 -04:00

guestbook-ng

The goal of guestbook-ng is to integrate across vendors and customers with full-service analytics insights by leveraging the latest in Perl Mojolicious blockchain technologies powered by AI.

DB Config

$ cat guestbook-ng.conf
{
    secrets => ['secret_goes_here'],
    'TagHelpers-Pagination' => {
        separator => '',
        current   => '<strong><u>{current}</u></strong>',
        next      => 'Next',
        prev      => 'Prev',
        ellipsis  => '..'
    },
    dev_env => {
        pg_string => 'postgresql://user:PASSWORD@example.com/db'
    },
    prod_env => {
        pg_string => 'postgresql://user:PASSWORD@example.com/db'
    },
    max_posts => 5
}

secrets and the Postgres connection string are mandatory

Discord Webhook

If you provide a file in the same directory called .tom.url containing a Discord Webhook URL then a notification will go out when someone signs the Guestbook. If you're using Docker but don't want the Webhook behavior, just create an empty file to make the Docker build work:

$ touch .tom.url

Testing

$ prove -l
t/basic.t .. ok
All tests successful.
Files=1, Tests=6,  1 wallclock secs ( 0.04 usr  0.00 sys +  0.58 cusr  0.05 csys =  0.67 CPU)
Result: PASS

Add the -v option for more verbose output

Docker

Build

docker build -t guestbook-ng .

Tag

podman tag guestbook-ng git.minimally.online/swaggboi/guestbook-ng

Push

docker push git.minimally.online/swaggboi/guestbook-ng

Pull

podman pull git.minimally.online/swaggboi/guestbook-ng

Run

podman run -dt --rm --name guestbook-ng -p 3001:3000 guestbook-ng:latest

Generate unit file

podman generate systemd --files --new --name guestbook-ng

TODOs

  1. Do something about the hardcoded URL in Webhook stuff