Skip to content

Instantly share code, notes, and snippets.

@acrossoffwest
Created November 5, 2021 13:19
Show Gist options
  • Save acrossoffwest/b38835b211a09ec6bc01b3adeda55f3e to your computer and use it in GitHub Desktop.
Save acrossoffwest/b38835b211a09ec6bc01b3adeda55f3e to your computer and use it in GitHub Desktop.
Run Spring Boot App with docker/.env variables
#!/bin/bash
RUN_DOCKER_COMPOSE="cd docker/ && docker-compose up -d"
if [ "$1" == "-d" ]; then
eval $RUN_DOCKER_COMPOSE
elif [ "$1" == "-msld" ]; then
msl "$RUN_DOCKER_COMPOSE"
fi
set -o allexport
source docker/.env
./mvnw spring-boot:run
set +o allexport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment