8 ms·
My web app is hosted on a server on Hetzner Cloud. I don't use Docker. For: * Database: PostgreSQL installed through apt in the same server: https://github.co
by sirodoht 5y ago
My web app is hosted on a server on Hetzner Cloud. I don't use Docker.
For:
* Database: PostgreSQL installed through apt in the same server: https://github.com/sirodoht/mataroa/blob/master/docs/server-playbook.md#postgresql https://github.com/sirodoht/mataroa/blob/master/docs/server-...
* Backups: MinIO-upload to an S3-compatible object storage: https://github.com/sirodoht/mataroa/blob/master/backup-database.sh https://github.com/sirodoht/mataroa/blob/master/backup-datab...
* CI: Github Actions + sr.ht builds: https://github.com/sirodoht/mataroa/blob/master/.github/workflows/django-build.yml https://github.com/sirodoht/mataroa/blob/master/.github/work... + https://github.com/sirodoht/mataroa/blob/master/.build.yml https://github.com/sirodoht/mataroa/blob/master/.build.yml
* CD: (not exactly CD but...) ssh + git pull + uWSGI reload: https://github.com/sirodoht/mataroa/blob/master/deploy.sh https://github.com/sirodoht/mataroa/blob/master/deploy.sh
* Rollbacks: git revert HEAD + ./deploy.sh
* Architecture pattern: stick to the monolith; avoid to deploy another service at all costs; eg. we need to send multiple emails? not celery, that would mean hosting a redis/rabbitmq. We already have a database so let's use that. We can also use Django management commands and cron: https://github.com/sirodoht/mataroa/blob/5bb46e05524d99c346ccf1e5080cb51cb93aa9cc/main/models.py#L309 https://github.com/sirodoht/mataroa/blob/5bb46e05524d99c346c... + https://github.com/sirodoht/mataroa/blob/master/main/management/commands/process_notifications.py https://github.com/sirodoht/mataroa/blob/master/main/managem...