up:: docker-swarm jump:: down::


  • 04:44 Example app - Dockerfile - Compose - Github Action
  • 05:39 Get a VPS with “Hostinger” (or just selfhost)
    • based on Ubuntu setup
    • Setup domain/dns
    • 07:54 setup a production VPS
    • 08:31 install docker
  • 09:15 Remote docker host
    • Environment variable export DOCKER_HOST=ssh://<user>@<hostname>
    • 09:23 Docker context
      • can store/manage multiple docker hosts
      • 09:35 create a context
        • docker context create <context-name> --docker "host=ssh://<user>@<hostname>"
      • 10:17 use the context
        • docker context use <context-name>
  • 10:42 docker swarm is required on all nodes for stacks
    • 10:35 init the swarm on the first machine
      • docker swarm init
        • save the returned token or docker swarm join-token worker to get a new one
  • 11:14 deploy the first stack
    • docker stack deploy -c /path/to/compose.yaml <stack-name>
  • 13:33 secrets
    • 14:04 create one
      • docker secret create <secret-name>
      • 14:26 secrets require a file or stdin
        • printf 'mysecretpassword' | docker secret create db-password -
          • will return the id of a secret
    • 14:45 list secrets
      • docker secrets ls
  • 16:23 support rolling releases (blue/green)
    • 16:43add this to compose
      • deploy -> update_config -> order -> start-first
  • 17:54 scaling applications
    • docker service scale myservice=3
  • 20:00 rollbacks <3
    • docker service rollback <service-name>
  • 20:23 actions

Sources