sjacorg / bayanat

Open source data management solution for human rights documentation.
https://bayanat.org/
GNU Affero General Public License v3.0
21 stars 13 forks source link

Updates and fixes for the existing Docker-based hosting capability #19

Closed sfpurdy closed 1 year ago

sfpurdy commented 1 year ago

Changes

Admin Credentials

Added the ability to set admin credentials using environment variables so they don't have to be set once everything is running. This allows for unattended deployments such as in CI/CD pipelines.

PostgreSQL Connection Dropping

There was an error that caused the PostgreSQL connection to drop when the cached connection goes stale. The fix to the error required the pool_pre_ping=True configuration to be passed to SQL Alchemy per the SQLAlchemy Documentation. This fix uses the SQLALCHEMY_ENGINE_OPTIONS option of the flask-sqlalchemy module to set the pool_pre_ping configuration as outlined in the Module Docs

Redis Configuration

The existing configs for Redis were not working when running in Docker Compose. This adds configuration items to fix the issue and make the naming a bit more consistent.

Dockerfile

PostgreSQL Service

Docker Compose Changes

Adds the ability to run in a Docker Swarm cluster as well as incorporating changes to run more effectively using Docker Compose.

Miscellaneous Changes

sjacgit commented 1 year ago

Many thanks for your contribution. We'll review the changes and respond in due course. However, we'll likely to ask to amend this PR or submit a new one as he Docker changes are in conflict with the upcoming new version we're planning to release shortly. We'll revert back shortly. Again, thank you so much.

sfpurdy commented 1 year ago

Many thanks for your contribution. We'll review the changes and respond in due course. However, we'll likely to ask to amend this PR or submit a new one as he Docker changes are in conflict with the upcoming new version we're planning to release shortly. We'll revert back shortly. Again, thank you so much.

Okay, sounds good. I can update this PR once you publish the changes.

sjacgit commented 1 year ago

Thanks for your patience. The changes are now push to the repo. Could you please review as agreed and revert back?

sfpurdy commented 1 year ago

Thanks for your patience. The changes are now push to the repo. Could you please review as agreed and revert back?

Yup, I'll review and update this PR.