Skip to content

Instantly share code, notes, and snippets.

View sometimescasey's full-sized avatar

Casey Li sometimescasey

View GitHub Profile
@sometimescasey
sometimescasey / aws-lightsail-renew-cert.md
Last active April 4, 2021 20:37
Notes re renewing AWS Lightsail Bitnami Ghost instance certificate

Renewing SSL certificates for https loading in Bitnami AWS Lightsail Ghost blog

Regenerate server.crt and server.key

Once you've already set up your certs using bncert-tool, the thing you actually need to replace every 30 days is the base certificates which you created by following https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-using-lets-encrypt-certificates-with-nginx.

You'll need to do the DNS challenges again using TXT records in Lightsail.

Make a note of the expiry date.

Replace symlinks (example below is for my Ghost blog, ymmv):

@sometimescasey
sometimescasey / django_heroku_setup.md
Last active July 1, 2021 22:26
Django Heroku Setup notes

Django Heroku setup notes

How to do normal Django manage commands?

I.e. create superuser, check migrations, run migrations...

Also, don't make migrations on the Heroku machine. Make them locally and commit to version control.

heroku run python manage.py showmigrations --app myapp
heroku run python manage.py migrate --app myapp
heroku run python manage.py createsuperuser --app myapp
convert -delay 20 -loop 0 -dispose previous *.png myimage.gif