From f071ad455821ab376171b64e1491b75c966c579f Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 27 May 2022 16:47:33 +0000 Subject: [PATCH] helper scripts --- bin/deploy-production | 19 +++++++++++++++++++ bin/docker-compose-production | 6 ++++++ 2 files changed, 25 insertions(+) create mode 100755 bin/deploy-production create mode 100755 bin/docker-compose-production diff --git a/bin/deploy-production b/bin/deploy-production new file mode 100755 index 00000000..45a4dfec --- /dev/null +++ b/bin/deploy-production @@ -0,0 +1,19 @@ +#!/bin/bash + +# change to the project's root directory +cd "${0%/*}/.." + +# put our scripts on the path +export PATH="$(pwd)/bin:$PATH" + +# build the image +docker-compose-production build --pull + +# run the image +docker-compose-production up -d + +sleep 3 + +docker-compose-production ps + +echo "$(pwd)/bin/docker-compose-production logs -f" diff --git a/bin/docker-compose-production b/bin/docker-compose-production new file mode 100755 index 00000000..1d35374d --- /dev/null +++ b/bin/docker-compose-production @@ -0,0 +1,6 @@ +#!/bin/bash + +# change to the project's root directory +cd "${0%/*}/.." + +exec docker-compose -f docker-compose.prod.yml "$@"