adorsys/datasafe

View on GitHub
datasafe-rest-impl/2.startDockerImageWithAmazon.sh.template

Summary

Maintainability
Test Coverage
#
# trap with sigint because container can not be stopped from command line otherwise
#

echo =====================================================
echo "PLEASE VISIT http://localhost:8080/static/index.html"
echo
which pbcopy
if (( $? == 0 ))
then
    echo "http://localhost:8080/static/index.html" | pbcopy
    echo "this url is already in your clipboard :-)"
fi
echo "pres CTRL-C to stop container"
echo
echo =====================================================

docker run                                                                                 \
    --rm                                                                                 \
    -it                                                                                 \
    --name datasafe-rest-test                                                            \
    -e JWT_SECRET=jnknjknvkjdfnjkvnkdfnvjkndfivfnjkvnskcnncjksnjkvndjfknjkvndfknvjk     \
    -e DEFAULT_USER=your_user_to_come_to_the_rest_api                                     \
    -e DEFAULT_PASSWORD=password_for_rest_api                                             \
    -p 8080:8080                                                                         \
    -e AWS_ACCESS_KEY_ID=<your access key>                                                 \
    -e AWS_SECRET_ACCESS_KEY=<your secret key>                                          \
    -e AWS_BUCKET=<your root bucket >                                                     \
    -e AWS_REGION=<your region>                                                         \
    -e DATASAFE_S3_STORAGE=true                                                         \
    -e EXPOSE_API_CREDS=true                                                             \
    datasafe-rest-test:latest