genofire/hs_monolith
genofire
/
hs_monolith
Archived
1
0
Fork 0
This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
hs_monolith/start-db.sh

19 lines
540 B
Bash
Raw Normal View History

2017-03-01 22:07:08 +01:00
#!/bin/bash
[[ -n "$DOCKER_HOST" ]] && echo "DOCKER_HOST: $DOCKER_HOST"
if [[ ! -n "$LAB_MONOLITH_DB_IP" ]]; then
echo 'ERROR: LAB_MONOLITH_DB_IP is not set.'
exit 1
else
echo "LAB_MONOLITH_DB_IP: $LAB_MONOLITH_DB_IP"
fi
if [[ ! -n "$LAB_MONOLITH_DB_PASSWORD" ]]; then
echo 'ERROR: LAB_MONOLITH_DB_PASSWORD is not set.'
exit 1
fi
echo 'Starting database for integration tests...'
docker run --rm --name monolith-postgres\
-p 15432:5432\
-e POSTGRES_USER=monolith\
-e POSTGRES_PASSWORD=$LAB_MONOLITH_DB_PASSWORD\
-d postgres:9