diff --git a/docs/advanced/advanced.md b/docs/advanced/advanced.md index 0c27f791..c1d5ca23 100644 --- a/docs/advanced/advanced.md +++ b/docs/advanced/advanced.md @@ -1,111 +1,138 @@ These exmaples used Docker Compose syntax. See the [Installation section](../installation.md#docker-compose-example) to fit them into your configuration. -## Alternative Source Directories -Don't have all your container volumes in the same directory? That's okay, we can use Docker volume mappings to help. - !!! tip "Remember the folder naming convention" 1. The `container-name` must match the `source` and `destination` folder names. 2. You can override this using [Aruguments](../arguments.md#override-source-directory). -### Sandard and Alternative -```yaml -volumes: - # Standard config - - /var/run/docker.sock:/var/run/docker.sock - - /source:/app/source - - /destination:/app/destination - # Alternative source directories examples - - /opt/pihole:/app/source/pihole - - /mnt/docker_volumes/plex:/app/source/plex -``` - -This config allows the addition of volumes outside the traditional `source` directory. - -We added 2 additional source volumes: `pihole` and `plex`. The end result will have a source directory inside the Nautical container that looks like this: - -```bash -/app/source: - - container1-data #(1)! - - container2-data #(2)! - - pihole # Mapped from /opt/pihole - - plex # Mapped from /mnt/docker_volumes/plex -``` - -1. This is an example container data folder from the mounted `/source` directory -2. This is an example container data folder from the mounted `/source` directory - -### Alternative Only -```yaml -volumes: - # Standard config - - /var/run/docker.sock:/var/run/docker.sock - - /destination:/app/destination - # Alternative source directories examples - - /opt/pihole:/app/source/pihole - - /opt/trilium:/app/source/trilium - - /mnt/docker_volumes/plex:/app/source/plex - - /var/data/portainer:/app/source/portainer -``` -This configuration allows us to map as many container data folders as we'd like from any source directory. -```yaml -/app/source: - - pihole # Mapped from /opt/pihole - - trilium # Mapped from /opt/trilium - - plex # Mapped from /mnt/docker_volumes/plex - - portainer # Mapped from /var/data/portainer -``` +## Alternative Source Directories +Don't have all your container volumes in the same directory? That's okay, we can use Docker volume mappings to help. + + +=== "Example 1" + This config allows additional volumes *outside* the traditional `source` directory. + + ```yaml + volumes: + # Standard config + - /var/run/docker.sock:/var/run/docker.sock + - /source:/app/source + - /destination:/app/destination + # Alternative source directories examples + - /opt/pihole:/app/source/pihole #(1)! + - /mnt/docker_volumes/plex:/app/source/plex #(2)! + ``` + + 1. Mounted from a different `source` directory + 2. Mounted from a different `source` directory + + We added 2 additional source volumes: `pihole` and `plex`. The end result will have a source directory inside the Nautical container that looks like this: + + ```bash + /app/source: + - container1-data #(1)! + - container2-data #(2)! + - pihole # Mapped from /opt/pihole + - plex # Mapped from /mnt/docker_volumes/plex + ``` + + 1. This is an example container data folder from the mounted `/source` directory + 2. This is an example container data folder from the mounted `/source` directory + +=== "Example 2" + This config uses volumes __only__ *outside* the traditional `source` directory. + + ```yaml + volumes: + # Standard config + - /var/run/docker.sock:/var/run/docker.sock + - /destination:/app/destination #(1)! + # Alternative source directories examples + - /opt/pihole:/app/source/pihole + - /opt/trilium:/app/source/trilium + - /mnt/docker_volumes/plex:/app/source/plex + - /var/data/portainer:/app/source/portainer + ``` + + 1. Even though we used alternative `source` directories, the `destination` directories will all be the same: + ```text + /destination/pihole + /destination/trilium + /destination/plex + /destination/portainer + ``` + + This configuration allows us to map as many container data folders as we'd like from any source directory. + ```yaml + /app/source: + - pihole # Mapped from /opt/pihole + - trilium # Mapped from /opt/trilium + - plex # Mapped from /mnt/docker_volumes/plex + - portainer # Mapped from /var/data/portainer + ``` ## Alternative Destination Directories We can also remap the distination directory for any container we'd like. -!!! tip "Remember the folder naming convention" - 1. The `container-name` must match the `source` and `destination` folder names. - 2. You can override this using [Aruguments](../arguments.md#override-destination-directory). - -### Sandard and Alternative -```yaml -volumes: - # Standard config - - /var/run/docker.sock:/var/run/docker.sock - - /source:/app/source - - /destination:/app/destination - # Alternative destination directories examples - - /opt/pihole-backup:/app/destination/pihole - - /mnt/docker_volume-backups/plex:/app/destination/plex -``` - -This config allows the addition of volumes outside the traditional `destination` directory. - -We added 2 additional destination volumes: `pihole` and `plex`. The end result will have a destination directory inside the Nautical container that looks like this: - -```yaml -/app/destination: - - container1-data #(1)! - - container2-data #(2)! - - pihole # Mapped to /opt/pihole-backup - - plex # Mapped to /mnt/docker_volume-backups/plex -``` - -1. This is an example container data folder from the mounted `/source` directory -2. This is an example container data folder from the mounted `/source` directory - -### Alternative Only -```yaml -volumes: - # Standard config - - /var/run/docker.sock:/var/run/docker.sock - - /source:/app/source - # Alternative destination directories examples - - /opt/pihole:/app/destination/pihole - - /opt/trilium:/app/destination/trilium - - /mnt/docker_volumes/plex:/app/destination/plex - - /var/data/portainer:/app/destination/portainer -``` -This configuration allows us to map as many container data folders as we'd like to any destination directory. -```yaml -/app/destination: - - pihole # Mapped to /opt/pihole - - trilium # Mapped to /opt/trilium - - plex # Mapped to /mnt/docker_volumes/plex - - portainer # Mapped to /var/data/portainer -``` \ No newline at end of file + +=== "Example 1" + ```yaml + volumes: + # Standard config + - /var/run/docker.sock:/var/run/docker.sock + - /source:/app/source #(1)! + - /destination:/app/destination + # Alternative destination directories examples + - /opt/pihole-backup:/app/destination/pihole + - /mnt/docker_volume-backups/plex:/app/destination/plex + ``` + + 1. Even though we used alternative `destination` directories, the `source` directories are using the standard configuration: + ```text + /source/pihole + /source/plex + ``` + + This config allows the addition of volumes outside the traditional `destination` directory. + + We added 2 additional destination volumes: `pihole` and `plex`. The end result will have a destination directory inside the Nautical container that looks like this: + + ```yaml + /app/destination: + - container1-data #(1)! + - container2-data #(2)! + - pihole # Mapped to /opt/pihole-backup + - plex # Mapped to /mnt/docker_volume-backups/plex + ``` + + 1. This is an example container data folder from the mounted `/source` directory + 2. This is an example container data folder from the mounted `/source` directory + +=== "Example 2" + ```yaml + volumes: + # Standard config + - /var/run/docker.sock:/var/run/docker.sock + - /source:/app/source #(1)! + # Alternative destination directories examples + - /opt/pihole:/app/destination/pihole + - /opt/trilium:/app/destination/trilium + - /mnt/docker_volumes/plex:/app/destination/plex + - /var/data/portainer:/app/destination/portainer + ``` + + 1. Even though we used alternative `destination` directories, the `source` directories will all be the same: + ```text + /source/pihole + /source/trilium + /source/plex + /source/portainer + ``` + + This configuration allows us to map as many container data folders as we'd like to any destination directory. + ```yaml + /app/destination: + - pihole # Mapped to /opt/pihole + - trilium # Mapped to /opt/trilium + - plex # Mapped to /mnt/docker_volumes/plex + - portainer # Mapped to /var/data/portainer + ``` \ No newline at end of file diff --git a/docs/advanced/nfs-share.md b/docs/advanced/nfs-share.md index 669ef809..6f4aa4dd 100644 --- a/docs/advanced/nfs-share.md +++ b/docs/advanced/nfs-share.md @@ -2,7 +2,7 @@ Nautical itself does not have the ability to map network shares. However, it can Commonly, we run containers on our host machine, then use an NFS share as the backup destination location. This page will give a brief overview of how to do that. -## NFS Shares On Container Host (Linux) +## Connect to an NFS Share On Container Host (Linux) 1. Create the NFS destination directories. ```bash