fix install scripts

This commit is contained in:
Simon Larsen
2023-04-05 10:48:35 +01:00
parent 26f08e3109
commit 785415b156
2 changed files with 5 additions and 7 deletions

View File

@@ -1,5 +1,8 @@
#!/usr/bin/env bash
# Pull latest changes
git pull
set -e
bash preinstall.sh
@@ -7,13 +10,8 @@ bash preinstall.sh
# Load env values from config.env
export $(grep -v '^#' config.env | xargs)
# Pull latest changes
git pull
sudo docker compose pull
# Create database if it does not exists
sudo docker compose up -d postgres && sleep 30 && sudo docker compose exec postgres psql postgresql://$DATABASE_USERNAME:$DATABASE_PASSWORD@localhost:5432/postgres -c 'CREATE DATABASE oneuptimedb' || echo "Database already created"