2017-07-13 09:39:59 -07:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
VERSION=$1
|
|
|
|
if [ -z "$VERSION" ]; then
|
|
|
|
echo "Usage: $0 <version>"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Assumption: docker is already installed
|
|
|
|
# Also, you should be in the sudoers
|
|
|
|
|
|
|
|
# Build the application's distribution zip
|
|
|
|
(cd .. && ./gradlew dist)
|
2017-07-24 14:35:56 -07:00
|
|
|
|
2017-07-13 09:39:59 -07:00
|
|
|
# Build docker images
|
|
|
|
(cd wherehows-frontend && ./build.sh $VERSION)
|
|
|
|
(cd wherehows-backend && ./build.sh $VERSION)
|
|
|
|
(cd wherehows-mysql && ./build.sh $VERSION)
|
2017-07-24 14:35:56 -07:00
|
|
|
(cd wherehows-elasticsearch && ./build.sh $VERSION)
|
2017-07-13 09:39:59 -07:00
|
|
|
|
|
|
|
cd ..
|
|
|
|
echo "now run this to start the application:"
|
|
|
|
echo "docker-compose up"
|