User Tools

Site Tools


add-container

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
add-container [2025/05/25 19:46] – [Setup compose file] lucasrufkahradd-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: pool0+    * Storage: pool1
     * 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 /mnt/docker-compose-files/container_name-domain-tld 
-  - Add docker compose file to /mnt/docker-compose-files/<container>+  - Add docker compose file to /mnt/docker-compose-files/container_name-domain-tld 
 +    * 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:
-<code>+ 
 +==== Inside service section ==== 
 + 
 +Required for posterity. 
 + 
 +  * <code>
  
 container_name: container_name-domain-tld container_name: container_name-domain-tld
 +
 +</code>
 +
 +This will restart your container on a server reboot.
 +
 +  * <code>
 +
 +restart: unless-stopped
 +
 +</code>
 +
 +=== Make sure you set any volumes that your container requires to the disk you created earlier! ===
 +
 +  * <code>
 +
 +volumes:
 +  - /mnt/docker/example/data:/example_data
 +  - /mnt/docker/example/db:/example_db
 +
 +</code>
 +
 +Required to reach your container via DNS and will enable TLS.
 +
 +  * <code>
  
 labels: labels:
Line 43: 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
 +
 </code> </code>
  
-===== Modify traefik compose file ===== +Required for traefik to route to your container. 
-<code>+ 
 +  * <code> 
 networks: networks:
-  - <container>_default+  - container_name-domain-tld_net 
 +  - proxy_net 
 </code> </code>
-<code>+ 
 +==== Outside the service section ==== 
 + 
 +Required for docker to create networks. 
 + 
 +  * <code> 
 networks: networks:
-  <container>_default+  container_name-domain-tld_net
-    name: <container>_default+    name: container_name-domain-tld_net 
 +  proxy_net: 
 +    name: proxy_net
     external: true     external: true
 +
 </code> </code>
 +
 +
add-container.1748220387.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