Created
August 22, 2021 16:17
-
-
Save klement97/aa4a40e9c5f35ea3db598e327c03bf96 to your computer and use it in GitHub Desktop.
Installation script for Venue Management
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
#!/usr/bin/env bash | |
set -e | |
REPO_URL="https://github.com/klement97/venue" | |
clone_repo() { | |
git clone $REPO_URL --depth 1 ~/venue_management | |
} | |
setup() { | |
echo 'Getting the application up with docker-compose...' | |
cd ~/venue_management | |
docker-compose up | |
} | |
seed_data() { | |
echo 'Loading seed data...' | |
docker exec venue_management_web_1 python manage.py seeddata | |
} | |
run_tests() { | |
echo 'Running the tests...' | |
docker exec venue_management_web_1 pytest | |
} | |
install_success() { | |
# Credits goes to the creator of the tool: http://patorjk.com/software/taag/ | |
cat <<'EOF' | |
__ __ __ __ _ | |
\ \ / / | \/ | | | | |
\ \ / /__ _ __ _ _ ___ | \ / | __ _ _ __ __ _ __ _ ___ _ __ ___ ___ _ __ | |_ | |
\ \/ / _ \ '_ \| | | |/ _ \ | |\/| |/ _` | '_ \ / _` |/ _` |/ _ \ '_ ` _ \ / _ \ '_ \| __| | |
\ / __/ | | | |_| | __/ | | | | (_| | | | | (_| | (_| | __/ | | | | | __/ | | | |_ | |
\/ \___|_| |_|\__,_|\___| |_| |_|\__,_|_| |_|\__,_|\__, |\___|_| |_| |_|\___|_| |_|\__| | |
__/ | | |
|___/ ....is now installed! | |
EOF | |
} | |
main() { | |
clone_repo | |
setup | |
seed_data | |
run_tests | |
install_success | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment