Skip to content

Instantly share code, notes, and snippets.

@stevemcquaid
Created July 16, 2014 22:30
Show Gist options
  • Save stevemcquaid/a7529d4d7414e7e7d682 to your computer and use it in GitHub Desktop.
Save stevemcquaid/a7529d4d7414e7e7d682 to your computer and use it in GitHub Desktop.
Docker 3 Container setup. Nginx for reverse proxy/load distrobution + node hello world app + wordpress. Just run this fine & you are done.
HELLOWORLDNODEHOST=n-smcquaid.dev-godaddy.com
WORDPRESSHOST=wp-smcquaid.dev-godaddy.com
### Pull and run nginx-proxy container
git clone https://github.com/jwilder/nginx-proxy.git
cd nginx-proxy
docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock -t jwilder/nginx-proxy
cd ..
### Run hello-world-node
git clone https://github.com/stevemcquaid/hello-world-node.git
cd hello-world-node
docker build -t smcquaid/hello-world-node .
docker run -d -P -e VIRTUAL_HOST=$HELLOWORLDNODEHOST hello-world-node nodejs /src/hello.js
cd ..
### Since this is a remote docker repo - no file directories to navigate
git clone https://github.com/jbfink/docker-wordpress.git
cd docker-wordpress
docker build -rm -t jbfink/docker-wordpress .
docker run -e VIRTUAL_HOST=$WORDPRESSHOST -d -P jbfink/docker-wordpress
cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment