- Copy
.env.dist
to.env
- Set all values.
- Note: Portions of
./init
MUST specify SSH_USER as root, so specify values accordingly. - Also, be sure you are working on your local machine when you run
./init
!
- Note: Portions of
- Run
./init
SERVER_IP
IP of serverSSH_USER
SSH usernameSSH_PRIVATE_KEY
Location of SSH private key on your local machineLE_EMAIL
Email addressed used for Let's Encrypt certificates generated via Traefik
Full blog post on usage can be found here.
Blog posts about my additions to this tool can be found here. My fork of this project is here.
Launching a site under the docker-bootstrap umbrella involves opening an SSH terminal on the host, in my case that's ssh://[email protected], setting some key environment variables, and executing a docker container run
command. The necessary environment and command snippets include:
Modified to use static.grinnell.edu
as the target HOST
. This works!
NAME=jtreminio_com
HOST=static.grinnell.edu
IMAGE="jtreminio/jtreminio.com"
docker container run -d --name ${NAME} \
--label traefik.backend=${NAME} \
--label traefik.docker.network=traefik_webgateway \
--label traefik.frontend.rule=Host:${HOST} \
--label traefik.port=80 \
--label com.centurylinklabs.watchtower.enable=true \
--network traefik_webgateway \
--restart always \
${IMAGE}
This works!
NAME=blogs-mcfatem
HOST=static.grinnell.edu
IMAGE="mcfatem/blogs-mcfatem"
docker container run -d --name ${NAME} \
--label traefik.backend=${NAME} \
--label traefik.docker.network=traefik_webgateway \
--label "traefik.frontend.rule=Host:${HOST};PathPrefixStrip:/blogs/McFateM" \
--label traefik.port=80 \
--label com.centurylinklabs.watchtower.enable=true \
--network traefik_webgateway \
--restart always \
${IMAGE}
Yep, this works!
NAME=blogs-mcfatem
HOST=mark.mcfate.family
IMAGE="mcfatem/blogs-mcfatem"
docker container run -d --name ${NAME} \
--label traefik.backend=${NAME} \
--label traefik.docker.network=traefik_webgateway \
--label "traefik.frontend.rule=Host:${HOST};PathPrefixStrip:/blogs/GrinnellCollege" \
--label traefik.port=80 \
--label com.centurylinklabs.watchtower.enable=true \
--network traefik_webgateway \
--restart always \
${IMAGE}
My https://iowageocachers.org/blog setup
Yep, this works!
NAME=blogs-landmark
HOST=iowageocachers.org
IMAGE="summittdweller/blogs-landmark"
docker container run -d --name ${NAME} \
--label traefik.backend=${NAME} \
--label traefik.docker.network=traefik_webgateway \
--label "traefik.frontend.rule=Host:${HOST};PathPrefixStrip:/blog" \
--label traefik.port=80 \
--label com.centurylinklabs.watchtower.enable=true \
--network traefik_webgateway \
--restart always \
${IMAGE}
My https://iowageocachers.org setup
Yep, this works!
NAME=blogs-landmark
HOST=iowageocachers.org
IMAGE="summittdweller/blogs-landmark"
docker container run -d --name ${NAME} \
--label traefik.backend=${NAME} \
--label traefik.docker.network=traefik_webgateway \
--label "traefik.frontend.rule=Host:${HOST}" \
--label traefik.port=80 \
--label com.centurylinklabs.watchtower.enable=true \
--network traefik_webgateway \
--restart always \
${IMAGE}
My https://static.grinnell.edu/vaf setup
This works!
NAME=vaf
HOST=static.grinnell.edu
IMAGE="mcfatem/vaf"
docker container run -d --name ${NAME} \
--label traefik.backend=${NAME} \
--label traefik.docker.network=traefik_webgateway \
--label "traefik.frontend.rule=Host:${HOST};PathPrefixStrip:/vaf" \
--label traefik.port=80 \
--label com.centurylinklabs.watchtower.enable=true \
--network traefik_webgateway \
--restart always \
${IMAGE}
Works!!!
NAME=weblog-sd
HOST=summittdweller.com
IMAGE="mcfatem/weblog-sd"
docker container run -d --name ${NAME} \
--label traefik.backend=${NAME} \
--label traefik.docker.network=traefik_webgateway \
--label "traefik.frontend.rule=Host:${HOST};PathPrefixStrip:/blogs/mark" \
--label traefik.port=80 \
--label com.centurylinklabs.watchtower.enable=true \
--network traefik_webgateway \
--restart always \
${IMAGE}