add-container
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| add-container [2025/05/25 19:45] – [Setup compose file] lucasrufkahr | add-container [2025/05/25 20:01] (current) – [Create SCSI disk] lucasrufkahr | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| - Add > Hard Disk | - Add > Hard Disk | ||
| * Bus/Device: SCSI | * Bus/Device: SCSI | ||
| - | * Storage: | + | * Storage: |
| * Disk size: Depends on use | * Disk size: Depends on use | ||
| - Click Add | - Click Add | ||
| Line 30: | Line 30: | ||
| ===== Setup compose file ===== | ===== Setup compose file ===== | ||
| - | - Make folder to contain docker compose files | + | - Make folder to contain docker compose files in / |
| - | - Add docker compose file to / | + | - Add docker compose file to / |
| + | * This can be created manually or downloaded from a project page online. | ||
| - Add following entries to docker-compose.yml: | - Add following entries to docker-compose.yml: | ||
| - | < | + | |
| + | ==== Inside service section ==== | ||
| + | |||
| + | Required for posterity. | ||
| + | |||
| + | * < | ||
| + | |||
| + | container_name: | ||
| + | |||
| + | </ | ||
| + | |||
| + | This will restart your container on a server reboot. | ||
| + | |||
| + | * < | ||
| + | |||
| + | restart: unless-stopped | ||
| + | |||
| + | </ | ||
| + | |||
| + | === Make sure you set any volumes that your container requires to the disk you created earlier! === | ||
| + | |||
| + | * < | ||
| + | |||
| + | volumes: | ||
| + | - / | ||
| + | - / | ||
| + | |||
| + | </ | ||
| + | |||
| + | Required to reach your container via DNS and will enable TLS. | ||
| + | |||
| + | * < | ||
| labels: | labels: | ||
| - traefik.enable=true | - traefik.enable=true | ||
| Line 40: | Line 73: | ||
| - traefik.http.routers.container_name-domain-tld.entrypoints=websecure | - traefik.http.routers.container_name-domain-tld.entrypoints=websecure | ||
| - traefik.http.routers.container_name-domain-tld.tls.certresolver=domain-tld-certresolver | - traefik.http.routers.container_name-domain-tld.tls.certresolver=domain-tld-certresolver | ||
| + | |||
| </ | </ | ||
| - | ===== Modify | + | Required for traefik |
| - | < | + | |
| + | * < | ||
| networks: | networks: | ||
| - | - < | + | - container_name-domain-tld_net |
| + | - proxy_net | ||
| </ | </ | ||
| - | < | + | |
| + | ==== Outside the service section ==== | ||
| + | |||
| + | Required for docker to create networks. | ||
| + | |||
| + | * < | ||
| networks: | networks: | ||
| - | | + | |
| - | name: < | + | name: container_name-domain-tld_net |
| + | proxy_net: | ||
| + | name: proxy_net | ||
| external: true | external: true | ||
| + | |||
| </ | </ | ||
| + | |||
| + | |||
add-container.1748220352.txt.gz · Last modified: by lucasrufkahr
