You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DoTheEvolution 361d971966 update 4 years ago
..
readme.md update 4 years ago

readme.md

Portainer in docker

guide by example

logo

Purpose

User friendly overview and managment of the running containers, networks, volumes, images,... the work.

Files and directory structure

/home/
└── ~/
    └── docker/
        └── portainer/
            ├── portainer_data/
            ├── .env
            └── docker-compose.yml

docker-compose

docker-compose.yml

version: '2'

services:
  portainer:
    image: portainer/portainer
    container_name: portainer
    hostname: portainer
    command: -H unix:///var/run/docker.sock
    restart: unless-stopped
    env_file: .env
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./portainer_data:/data

networks:
  default:
    external:
      name: $DEFAULT_NETWORK

.env

# GENERAL
MY_DOMAIN=blabla.org
DEFAULT_NETWORK=caddy_net
TZ=Europe/Bratislava

reverse proxy

Caddy v2 is used, details here.

Caddyfile

portainer.{$MY_DOMAIN} {
    reverse_proxy portainer:9000
}

Update

  • watchtower updates the image automaticly

  • manual image update
    docker-compose pull
    docker-compose up -d
    docker image prune