update dev scripts

This commit is contained in:
askiiart 2025-01-27 11:41:10 -06:00
parent f72a025dfe
commit e24eeebe24
Signed by untrusted user who does not match committer: askiiart
GPG key ID: 6A32977DAF31746A
2 changed files with 18 additions and 3 deletions

View file

@ -1,4 +1,9 @@
#!/usr/bin/env bash
set -ex
command_exists() { type "$1" &>/dev/null; }
./test.sh
rm -rf ./data/
mkdir -p ./data/{fedora-repo,librewolf,other-workspace}
@ -6,8 +11,16 @@ mkdir -p ./data/{fedora-repo,librewolf,other-workspace}
mkdir -p ./dev/{pgadmin,gregory-pg}
chmod -R 777 ./dev/pgadmin
podman-compose down
podman-compose -f podman-compose.dev.yml up -d
if command_exists "docker-compose"; then
docker-compose -f podman-compose.dev.yml down
docker-compose -f podman-compose.dev.yml up -d
elif command_exists "podman-compose"; then
podman-compose -f podman-compose.dev.yml down
podman-compose -f podman-compose.dev.yml up -d
else
echo "[ERROR] neither docker-compose nor podman-compose were found"
exit 127
fi
echo "
---
@ -19,4 +32,4 @@ echo 'pgadmin login:
echo 'pgadmin settings:
Hostname: "postgres"
Username: "gregory"
Password: "pass"'
Password: "pass"'

View file

@ -1,4 +1,6 @@
#!/usr/bin/env bash
set -ex
# set env vars for testing
export GREGORY_DB_ADDRESS=postgres
export GREGORY_DB_USER=gregory