Skip to content

Instantly share code, notes, and snippets.

@klement97
Created August 22, 2021 16:17
Show Gist options
  • Save klement97/aa4a40e9c5f35ea3db598e327c03bf96 to your computer and use it in GitHub Desktop.
Save klement97/aa4a40e9c5f35ea3db598e327c03bf96 to your computer and use it in GitHub Desktop.
Installation script for Venue Management
#!/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