Created
July 15, 2017 07:02
-
-
Save coleturner/e35f0736c7ccd8cbb17483205be63cdb to your computer and use it in GitHub Desktop.
Simple deployment script for `nginx-proxy`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z $1 ]; then echo "Please specify a deployment .env file"; fi | |
source $1 | |
echo "Deploying $DOCKER_IMAGE to $VHOST using $1" | |
docker pull $DOCKER_IMAGE | |
docker run -d --name $VHOST -e VIRTUAL_HOST=$VHOST --env-file=$1 "${@:2}" $DOCKER_IMAGE | |
echo "Done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DOCKER_IMAGE=my-docker/image:release-latest | |
NODE_ENV=production | |
VHOST=example.com | |
PORT=7000 | |
USER=node | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment