Created
August 7, 2017 16:19
-
-
Save thiennn/02b7dbdb199c65dfef45ea9fac2bc6c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
if psql -h simpldb --username postgres -lqt | cut -d \| -f 1 | grep -qw simplcommerce; then | |
echo "simplcommerce database existed" | |
else | |
echo "create new database simplcommerce" | |
psql -h simpldb --username postgres -c "CREATE DATABASE simplcommerce WITH ENCODING 'UTF8'" | |
psql -h simpldb --username postgres -d simplcommerce -a -f /app/dbscript.sql | |
psql -h simpldb --username postgres -d simplcommerce -a -f /app/StaticData_Postgres.sql | |
fi | |
cd /app && dotnet SimplCommerce.WebHost.dll |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment