Skip to content

Awesome tool for deployment and semi-automatic updates of a single-image Docker stack/container.

Notifications You must be signed in to change notification settings

McFateM/docker-bootstrap

 
 

Repository files navigation

Docker Bootstrap - my-fork

Installs

Instructions

  • 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!
  • Run ./init

Config values

  • SERVER_IP IP of server
  • SSH_USER SSH username
  • SSH_PRIVATE_KEY Location of SSH private key on your local machine
  • LE_EMAIL Email addressed used for Let's Encrypt certificates generated via Traefik

Full blog post on usage can be found here.

McFateM Additions

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:

Juan's original snippet

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}

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}

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}

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}

About

Awesome tool for deployment and semi-automatic updates of a single-image Docker stack/container.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%