Created
September 12, 2018 23:40
-
-
Save robherley/99d28b529bdedc280c8f231f23956a0c to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
echo "Howdy, what folder do you want to serve assets from?" | |
echo -n ">" | |
read foldrdir | |
echo "Okay, I'll read from $foldrdir. What do you want to name the container?" | |
echo -n ">" | |
read container | |
echo "The container will be named '$container'. What frontend rule do you want to use for traefik?" | |
echo -n ">" | |
read urlrule | |
echo "Creating container '$container' from $foldrdir mapped to $urlrule..." | |
docker run --name $container -v $PWD/$foldrdir:/usr/share/nginx/html:ro -d -l "traefik.enable=true" -l "traefik.backend=$container-static" -l "traefik.frontend.rule=Host:$urlrule" --network traefik_proxy nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment