Skip to content

Instantly share code, notes, and snippets.

@coleturner
Created July 15, 2017 07:02
Show Gist options
  • Save coleturner/e35f0736c7ccd8cbb17483205be63cdb to your computer and use it in GitHub Desktop.
Save coleturner/e35f0736c7ccd8cbb17483205be63cdb to your computer and use it in GitHub Desktop.
Simple deployment script for `nginx-proxy`
#!/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!"
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