forked from battery-lcf/battery-archive-sandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·23 lines (20 loc) · 1.04 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Copyright 2021 National Technology & Engineering Solutions of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights in this software.
rm env
COOKIE_SECRET=$(pwgen -1s 32)
SECRET_KEY=$(pwgen -1s 32)
POSTGRES_PASSWORD=$(pwgen -1s 32)
REDASH_DATABASE_URL="postgresql://postgres:${POSTGRES_PASSWORD}@postgres/postgres"
DATABASE_CONNECTION="postgresql://postgres:${POSTGRES_PASSWORD}@localhost:5432/postgres"
PGADMIN4_PASSWORD=$(pwgen -1s 32)
echo "PYTHONUNBUFFERED=0" >> env
echo "REDASH_LOG_LEVEL=INFO" >> env
echo "REDASH_REDIS_URL=redis://redis:6379/0" >> env
echo "POSTGRES_PASSWORD=$POSTGRES_PASSWORD" >> env
echo "REDASH_COOKIE_SECRET=$COOKIE_SECRET" >> env
echo "REDASH_SECRET_KEY=$SECRET_KEY" >> env
echo "REDASH_DATABASE_URL=$REDASH_DATABASE_URL" >> env
echo "DATABASE_CONNECTION=$DATABASE_CONNECTION" >> env
echo "[email protected]" >> env
echo "PGADMIN_DEFAULT_PASSWORD=$PGADMIN4_PASSWORD" >> env
sudo docker-compose run --rm server create_db
sudo docker-compose up -d