biff

A web framework + self-hosted deployment solution for Clojure. Repo: https://github.com/jacobobryant/biff. Docs: https://biff.findka.com
2020-11-19T12:15:49.103600Z

hitting my domain name is getting a 403 via ngnix. I assume ngnix is being hosted on digital ocean and so i need to check the ngnix logs to understand why. digital oecan lets me open a counsle to something, but it requires a user and password, which i was never prompted to setup. In the http://system.tf.json there is a digitalocean_droplet.connection.user = root but no mention of a password.

2020-11-19T12:17:44.103900Z

maybe the emailed it to me

2020-11-19T12:17:46.104100Z

or something

2020-11-19T12:21:34.104600Z

maybe the console is only usuable if you didnt do choose ssh?

2020-11-19T12:28:17.104800Z

yea thats it

2020-11-19T12:32:32.105200Z

2020/11/19 12:10:23 [error] 1092#1092: *91 directory index of "/var/www/biff/" is forbidden, root@biff-webserver:~/snap# ls -l /var/www/biff/ total 0 While that would do it

2020-11-19T12:47:38.106900Z

looks like my domain isn't resolving to the ip digital ocean says it will. Meanwhile, it also looks like i need to update by main.edn:

root@biff-webserver:~/snap# cat /home/biff/config/main.edn 
{:prod {; Standalone topology is only recommended for development.
        :biff.crux/topology :standalone
        ; Uncomment to use jdbc in production:
        ;:biff.crux/topology :jdbc
        ;:biff.crux.jdbc/dbname "..."
        ;:biff.crux.jdbc/user "..."
        ;:biff.crux.jdbc/password "..."
        ;:biff.crux.jdbc/host "..."
        ;:biff.crux.jdbc/port ...
        :biff/host "<http://urbardner.com|urbardner.com>"}
 :dev {:inherit [:prod]
       :biff/dev true}}
To be set to prod and setup postgres.

2020-11-19T21:36:50.113100Z

How long has it been since you pointed your domain to digitalocean's nameservers? It can take a little while for the change to take effect. You should be able to ssh into the droplet since it has your public key. is that how you got in? if the droplet is created without a public key, then digitalocean will email you a temporary password--but if that happens, it means the droplet wasn't created correctly (or at least it wasn't created in the way I intended). No need to update the config to set it to prod--that's handled for you. :prod is the default. In dev, the config is switched by running BIFF_ENV=dev clj ... (which is handled by ./task dev). Using standalone in prod is also fine for getting started, but yeah, you'll probably want to switch to postgres before you start serving real users.

2020-11-19T21:41:24.113400Z

relevant issue for dns: https://github.com/jacobobryant/biff/issues/58

2020-11-19T21:46:17.115600Z

the fact that /var/www/biff/ is empty surprises me. even if your domain's dns hasn't propagated yet, the app should still start up and write some files to that directory. If the startup script is unable to clone your git repo, that would explain it. What output do you get if you run this on the droplet?

# systemctl stop biff
# sudo -u biff /home/biff/run-as-biff.sh