fix install scripts

This commit is contained in:
Simon Larsen 2023-04-05 10:48:35 +01:00
parent 26f08e3109
commit 785415b156
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
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"

View File

@ -6,10 +6,10 @@ ONEUPTIME_SECRET=$(openssl rand -hex 12)
export ONEUPTIME_SECRET=$ONEUPTIME_SECRET
DATABASE_PASSWORD=$(openssl rand -hex 12)
export DATABASE_PASSWORD=$DATABASE_PASSWORD.
export DATABASE_PASSWORD=$DATABASE_PASSWORD
CLICKHOUSE_PASSWORD=$(openssl rand -hex 12)
export CLICKHOUSE_PASSWORD=$CLICKHOUSE_PASSWORD.
export CLICKHOUSE_PASSWORD=$CLICKHOUSE_PASSWORD
REDIS_PASSWORD=$(openssl rand -hex 12)
export REDIS_PASSWORD=$REDIS_PASSWORD