ausglamr/README.md

92 lines
2.3 KiB
Markdown
Raw Normal View History

2024-01-04 11:54:56 +11:00
# Aus GLAMR
A django app running on Docker. Replaces _Aus GLAM Blogs_.
2024-01-07 16:58:56 +11:00
## Deploy
* `docker compose build`
2024-01-09 18:11:22 +11:00
* `./glamr-dev makemigrations` (may get a DB connection error here, ignore it or run again)
2024-01-07 16:58:56 +11:00
* `./glamr-dev migrate`
2024-01-09 18:11:22 +11:00
* `./glamr-dev createsuperuser`
2024-01-07 16:58:56 +11:00
* `docker compose up`
* set up database backups (as cron jobs):
2024-01-09 18:11:22 +11:00
* `./glamr-dev backup`
* `/snap/bin/docker exec -u root ausglamr_db_1 pg_dump -v -Fc -U ausglamr -d "ausglamr" -f /tmp/ausglamr_backup.dump`
* `/snap/bin/docker cp ausglamr_db_1:/tmp/ausglamr_backup.dump /home/hugh/backups/`
* `mv /home/hugh/backups/ausglamr_backup.dump /home/hugh/backups/ausglamr_backup_$(date +'%a').dump`
2024-01-07 16:58:56 +11:00
* set up cron jobs for management commands as below
## Migrating
See `data/help.txt`
2024-01-04 11:54:56 +11:00
## Admin
Don't forget to add some Content Warnings for use by the Mastodon bot.
## CLI tool
Use `glamr-dev` to make your life easier (thanks to Mouse Reeve for the inspiration):
* announce
* check_feeds
* manage [django management command]
* makemigrations
* migrate
* queue_announcements
* send_weekly_email
And for dev work:
* black
* collectstatic
* createsuperuser
* pylint
* resetdb
* test
## Registration
- users can register a blog, group, event, newsletter, or Call for Papers.
- most of these ask for an "owner email" - this is optional but allows us to communicate with the person registering.
- all registrations should trigger an email to admin
- all must be approved before they are included
## Management commands
There are four commands:
- announce
- check_feeds
- queue_announcements
- send_weekly_email
These will not be triggered within the app - they should be called via cron jobs.
### announce
This announces the next queued announcement on Mastodon.
Run every 21 mins.
### check_feeds
This checks all blog feeds for any new posts, and adds them to the database as long as they don't have an exclusion tag and were not published during a time the blog was suspended.
Run every hour.
### queue_announcements
This queues announcements for events and CFPs. These are announced three times, evenly spaced between when they were added and when the event starts or the CFP closes.
Run daily.
### send_weekly_email
Does what you think. Creates a weekly email of the latest stuff, and send to everyone in Subscribers.
Run weekly.