Commit Graph

9 Commits

Author SHA1 Message Date
f7737ea00d fix: dump from database db 2024-11-27 20:00:37 +01:00
e7308bd5c6 feat: control default services via env vars
Read default postgres compose service name and default django compose
service name from env variables.

AHAB_POSTGRES_CONTAINER - defaults to `appserver`
AHAB_DJANGO_CONATINER - defaults to `postgresdb`

Default values are there for 100% backwards compatibility.
2024-11-27 18:13:12 +01:00
73a0b87c31 feat: swap println for eprintln or debug_eprintln
Unified expected output to always eprintln so outputs can be piped to
other processes. Added debug_eprintln and switched all occurances of
debug_println.
2024-10-25 09:03:49 +02:00
6fcf48ed61 feat: redirect pg_isready output to /dev/null
Fixed bug where restore commands were called inside pg_isready loop.
Made CommandBuilder::build public. Redirected stdout for pg_isready
calls to /dev/null via Stdio::null().
2023-11-27 20:58:28 +01:00
98f02c1c08 feat: pg_isready in postgres import
Fixed issue where arguments passed to `compose stop` weren't passed to
the underlying command. Added pg_isready call between each command call
in restore script.
2023-11-27 20:40:24 +01:00
316b37cd05 feat: custom command builder
Implemented custom command builder with nicer api suited for my needs.
Also returned error if there are no containers in
`scripts::postgres::get_containers`.
2023-06-02 17:18:25 +02:00
a625d5f43c feat: finish postgres cli
Implemented basic wanted functionality for postgres subcommands. We
currently assume that postgres is running in docker-compose project in a
service named "postgresdb". This could be looked at and changed at some
point in the future.
2023-05-24 00:00:06 +02:00
9f3cc86e3f feat: add basic error handling
Add anyhow::Result<()> return signature to all scripts and main.
2023-05-21 23:47:02 +02:00
eb232a93f8 feat: prepare initial cli layout
Made initial command scopes
d -> docker related commands
dc -> docker compose related commands
dj -> django related commands
pg -> postgres related commands
2023-05-21 22:40:34 +02:00