Just recipes, no nonsense
:License: MIT
https:/nononsense.recipes is an ad-free, subscription recipe website.
Setting up a fresh Ubuntu server. This uses scripts found in homebin
Add the postgresql repositories and use a newer version than whatever apt has. See here
Create a superuser in postgres for the main server user (probably 'ubuntu')
sudo su postgres
psql postgres
CREATE USER ubuntu WITH SUPERUSER;
\q
exit
Make sure TCP/IP connections with username/password are enabled for postgres.
For standard install edit files in /etc/postgresql/15/main
(replace 15 with postgresql version used)
Edit postgres.conf
to enable TCP/IP and pg_hba.conf
to set allowed for nnr user.
Add the nginx, redis, supervisor and utility scripts
sudo apt install redis, supervisor, nginx
git clone [email protected]:ggetzie/homebin.git
# on server
cd /usr/local/src/
git clone --recurse-submodules [email protected]:ggetzie/nnr.git
# on local
scp -i "nnr_server_key.pem" nnr_prod_keys ubuntu@nnr-server:/usr/local/src/nnr/.env
setup_user nnr_user
source export_dotenv nnr
setup_db $DB_USER $DB_NAME $nnr_DB_PW
psql nnr_db < nnr_db_prod.pgsql
link_srv nnr production
See instructions Note AWS Lightsail does not enable port 443 by default. Go to the networking tab in the Lightsail dashboard to open it.
update_go 1.19.3
cd /usr/local/src/nnr/awslambda/rotd
mkdir build
go build -o build/rotd rotd.go
Note server time is UTC. Run rotd once per day at 7am EST (UTC-5)
m h dom mon dow command
0 12 * * * /usr/local/src/nnr/recipes/management/rotd.sh