User Tools

Site Tools


add-container

This is an old revision of the document!


Adding a container

Create SCSI disk

  1. Log into vm.garynet.org
  2. Datacenter > vm > as.garynet.org > Hardware
  3. Add > Hard Disk
    • Bus/Device: SCSI
    • Storage: pool0
    • Disk size: Depends on use
  4. Click Add

Partition new disk

  1. Make mnt point directory with: mkdir /mnt/docker/<container>
  2. Find disk with fdisk -l
  3. Partition disk with cfdisk <disk>
    1. Select type gpt
    2. New and set max size
    3. Select write and type yes
    4. Quit
  4. Format partition with mkfs.ext4 /dev/<disk>1
  5. Find UUID with blkid
  6. Add disk to fstab with vim /etc/fstab:
    • UUID=<uuid> /mnt/docker/<container> auto rw,user,auto 0 0
  7. Verify no errors with findmnt –verify
  8. Reload systemd daemon with systemctl daemon-reload
  9. Mount disk with mount -a

Setup compose file

  1. Make folder to contain docker compose files
  2. Add docker compose file to /mnt/docker-compose-files/<container>
  3. Add following entries to docker-compose.yml:
labels:
  - "traefik.enable=true"
  - "traefik.http.routers.<container>.rule=Host(`<subdomain>.garynet.org`)"
  - "traefik.http.services.<container>.loadbalancer.server.port=<port>"
  - "traefik.http.routers.<container>.entrypoints=websecure"
  - "traefik.http.routers.<container>.tls.certresolver=myresolver"

Modify traefik compose file

networks:
  - <container>_default
networks:
  <container>_default:
    name: <container>_default
    external: true
add-container.1747858323.txt.gz · Last modified: by lucasrufkahr

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki