add-container
This is an old revision of the document!
Table of Contents
Adding a container
Create SCSI disk
- Log into vm.garynet.org
- Datacenter > vm > as.garynet.org > Hardware
- Add > Hard Disk
- Bus/Device: SCSI
- Storage: pool0
- Disk size: Depends on use
- Click Add
Partition new disk
- Make mnt point directory with:
mkdir /mnt/docker/<container> - Find disk with
fdisk -l - Partition disk with
cfdisk <disk>- Select type gpt
- New and set max size
- Select write and type yes
- Quit
- Format partition with
mkfs.ext4 /dev/<disk>1 - Find UUID with
blkid - Add disk to fstab with
vim /etc/fstab:UUID=<uuid> /mnt/docker/<container> auto rw,user,auto 0 0
- Verify no errors with
findmnt –verify - Reload systemd daemon with
systemctl daemon-reload - Mount disk with
mount -a
Setup compose file
- Make folder to contain docker compose files
- Add docker compose file to /mnt/docker-compose-files/<container>
- 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"
networks: - proxy
networks:
proxy:
name: proxy
add-container.1747704373.txt.gz · Last modified: by garyadmin
