Created
October 19, 2015 09:23
-
-
Save daveenguyen/e67eee248bf3e045892b to your computer and use it in GitHub Desktop.
Script to start each folder in the current directory as an nginx hosted static site. The virtual host will be [folder's name].example.com. Just modify the script to match your need.
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 | |
for d in */; do | |
docker run \ | |
-v ${PWD}/${d}:/usr/share/nginx/html:ro \ | |
-e VIRTUAL_HOST=${d::-1}.example.com \ | |
-d nginx | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment