No description
Find a file
2025-02-17 11:11:06 +00:00
.github/workflows Formatting fixup 2024-08-07 13:30:30 +02:00
.trunk Upgrade trunk 2025-02-17 11:11:00 +00:00
syncer If there is no secrets, just run like a normal system. 2023-03-22 08:12:05 +01:00
.actrc Initial seperation of containers 2024-05-17 09:49:08 +02:00
.gitignore Fixup? 2024-08-07 13:24:31 +02:00
.php-cs-fixer.php no_superfluous_phpdoc_tags=true is too agressive. Some "superfluous" phpdoc tags are extremely useful for IDE type hinting. 2022-09-12 00:47:26 +02:00
bake.hcl 10.9 is still latest as far as I am concerned. 2023-01-04 13:23:19 +01:00
CODE_OF_CONDUCT.md Initial seperation of containers 2024-05-17 09:49:08 +02:00
composer.json Formatting fixup 2024-08-07 13:30:30 +02:00
composer.lock Pruner implemented. 2022-09-01 17:10:40 +02:00
docker-compose.yml Formatting fixup 2024-08-07 13:30:30 +02:00
Dockerfile.mariadb Formatting fixup 2024-08-07 13:30:30 +02:00
Dockerfile.postgres Formatting fixup 2024-08-07 13:30:30 +02:00
Dockerfile.traptest Formatting fixup 2024-08-07 13:30:30 +02:00
LICENCE.md Initial seperation of containers 2024-05-17 09:49:08 +02:00
mysql.runit Fix: Push on Trapped Container Termination, Postgres Healthcheck & Typos 2022-09-01 15:28:13 +02:00
postgres.runit Initial working version. 2022-08-23 14:19:05 +02:00
postgres_healthcheck.sh Fix: Push on Trapped Container Termination, Postgres Healthcheck & Typos 2022-09-01 15:28:13 +02:00
README.md Formatting fixup 2024-08-07 13:30:30 +02:00
start.sh Working on CTRL+C and everything. 2022-09-01 16:31:45 +02:00
sync Initial working version. 2022-08-23 14:19:05 +02:00
sync-prune.runit Pruner implemented. 2022-09-01 17:10:40 +02:00
sync-pull.runit Fix: Push on Trapped Container Termination, Postgres Healthcheck & Typos 2022-09-01 15:28:13 +02:00
sync-push.runit Initial working version. 2022-08-23 14:19:05 +02:00
traptest.sh Working on CTRL+C and everything. 2022-09-01 16:31:45 +02:00

S3 backed Maria & Postgres Databases

This project comes out of frustration with ephemeral services not providing a trivial database for non-critical services that can be persisted beyond a restart.

This system starts and checks an s3 bucket for database dumps, downloads loads the most recent one and resets the database to that state.

Every 600 seconds after that, it dumps the database and persists it to s3 if there have been any changes.

This is extremely not meant for production workloads or anything you want to keep. QA systems, silly side projects, anything you don't want to pay Bezos for RDS for. On that note, please consider using Minio or any other S3 provider than AWS.

Configuration

MariaDB

MARIADB_RANDOM_ROOT_PASSWORD: "yes"
MARIADB_USER: example
MARIADB_PASSWORD: changeme
MARIADB_DATABASE: s3db
S3_ENDPOINT: http://minio:9000/
S3_API_KEY: <<secret>>
S3_API_SECRET: <<secret>>
S3_USE_PATH_STYLE_ENDPOINT: "yes" # This is only strictly neccisary with Minio, maybe others.
S3_BUCKET: "s3db"
S3_PREFIX: "test/mariadb/"

Postgres

POSTGRES_USER: example
POSTGRES_PASSWORD: changeme
S3_ENDPOINT: http://minio:9000/
S3_API_KEY: <<secret>>
S3_API_SECRET: <<secret>>
S3_USE_PATH_STYLE_ENDPOINT: "yes" # This is only strictly neccisary with Minio, maybe others.
S3_BUCKET: "s3db"
S3_PREFIX: "test/postgres/"