fix(db): correct variable syntax in pg_dump command

The previous version used $$ for variable expansion which doesn't work in this context. Changed to single $ for proper shell variable expansion in the database backup command.
This commit is contained in:
kithmina1999
2025-06-06 16:30:46 +05:30
parent f89e3e8554
commit c5e480af52

View File

@@ -141,7 +141,7 @@ services:
bash -c "while true; do
sleep 86400;
PGPASSWORD=$$POSTGRES_PASSWORD pg_dump -h worklenz_db -U $$POSTGRES_USER -d $$POSTGRES_DB \
> /pg_backups/worklenz_db_\$(date +%Y-%m-%d_%H-%M-%S).sql;
> /pg_backups/worklenz_db_$(date +%Y-%m-%d_%H-%M-%S).sql;
find /pg_backups -type f -name '*.sql' -mtime +30 -delete;
done"
restart: unless-stopped