Docker Info
This project is built with reuse and modularity in mind. Every service is separate into its own separate yml file and included in the main docker-compose.yml.
docker-compose.yml
# All colon based stuff is <external>:<internal> -- external being the host machine, internal being the container itself.
# Ports in this instance cannot conflict and must be unique on the internal side.
# i.e. everything cannot run on port 8080
############ OTHER NOTES ############
# The system data will be placed in this project directory by default if you change nothing
# Data is placed in .containers and is .gitignored already
# arm64v8 = Apple Silicon Based Macs
name: home-media-docker
include:
####### NETWORK STUFF ########
- ./compose-files/traefik/traefik-compose.yml
- ./compose-files/authentik/authentik.yml
- ./compose-files/vpn/vpn.yml
- ./compose-files/transmission/transmission.yml ## --profile vpn
- ./compose-files/duplicati/duplicati.yml ## --profile vpn
- ./compose-files/pihole/pihole.yml ## --profile vpn
####### NOTES ########
- ./compose-files/bookstack/bookstack.yml
####### CONTAINER MANAGEMENT ########
- ./compose-files/portainer/portainer.yml
####### MEDIA CONSUMPTION ########
- ./compose-files/emby/emby.yml ## --profile emby
- ./compose-files/plex/plex.yml ## --profile plex
- ./compose-files/jellyfin/jellyfin.yml ## --profile jellyfin
- ./compose-files/komga/komga.yml
- ./compose-files/navidrome/navidrome.yml
####### MEDIA MANAGEMENT ########
- ./compose-files/jellyseerr/jellyseerr.yml
- ./compose-files/sonarr/sonarr.yml
- ./compose-files/radarr/radarr.yml
- ./compose-files/lidarr/lidarr.yml
- ./compose-files/prowlarr/prowlarr.yml
- ./compose-files/jackett/jackett.yml ## --profile jackett
####### DASHBOARDS ########
- ./compose-files/dashy/dashy.yml
- ./compose-files/heimdall/heimdall.yml ## --profile heimdall
####### DOCKER VOLUMES AND NETWORK CONFIG ########
- ./compose-files/optional-mounted-volumes.yml
- ./compose-files/networks.yml
######## HOME AUTOMATION CONTAINERS #############
- ./compose-files/homeassistant/homeassistant.yml
- ./compose-files/zwavejs/zwavejs.yml
- ./compose-files/zigbee2mqtt/zigbee2mqtt.yml
######## FAMILY STUFF ###################
- ./compose-files/mealie/mealie.yml
- ./compose-files/mattermost/mattermost.yml
- ./compose-files/wallos/wallos.yml
######## PASSWORD MANAGER ###################
- ./compose-files/vaultwarden/vaultwarden.yml
Including Services
Docker ships with a very nice feature to be able to include other yml files and reuse code or import code into the final compose.
When you include a yml file (shown above), it is appended to the file and resolves any conflicts when the compose script is evaluated.
File Structure
Expand the structure below to see where the files are located.
docker-compose.yml
Home-Media-Docker/
├── compose-files <--------- Add files in this directory
│ ├── authentik
│ │ ├── .env-example
│ │ └── authentik.yml
│ ├── bookstack
│ │ ├── .env-example
│ │ └── bookstack.yml
│ ├── dashy
│ │ ├── .env-example
│ │ └── dashy.yml
│ ├── duplicati
│ │ ├── .env-example
│ │ └── duplicati.yml
│ ├── emby
│ │ ├── .env-example
│ │ └── emby.yml
│ ├── heimdall
│ │ ├── .env-example
│ │ └── heimdall.yml
│ ├── homeassistant
│ │ ├── .env-example
│ │ └── homeassistant.yml
│ ├── jackett
│ │ ├── .env-example
│ │ └── jackett.yml
│ ├── jellyfin
│ │ ├── .env-example
│ │ └── jellyfin.yml
│ ├── jellyseerr
│ │ ├── .env-example
│ │ └── jellyseerr.yml
│ ├── komga
│ │ ├── .env-example
│ │ └── komga.yml
│ ├── lidarr
│ │ ├── .env-example
│ │ └── lidarr.yml
│ ├── mattermost
│ │ ├── .env-example
│ │ └── mattermost.yml
│ ├── mealie
│ │ ├── .env-example
│ │ └── mealie.yml
│ ├── navidrome
│ │ ├── .env-example
│ │ └── navidrome.yml
│ ├── networks.yml
│ ├── optional-mounted-volumes.yml
│ ├── pihole
│ │ ├── .env-example
│ │ └── pihole.yml
│ ├── plex
│ │ ├── .env-example
│ │ └── plex.yml
│ ├── portainer
│ │ ├── .env-example
│ │ └── portainer.yml
│ ├── prowlarr
│ │ ├── .env-example
│ │ └── prowlarr.yml
│ ├── radarr
│ │ ├── .env-example
│ │ └── radarr.yml
│ ├── sonarr
│ │ ├── .env-example
│ │ └── sonarr.yml
│ ├── traefik
│ │ ├── .env-example
│ │ └── traefik-compose.yml
│ ├── transmission
│ │ ├── .env-example
│ │ └── transmission.yml
│ ├── vaultwarden
│ │ ├── .env-example
│ │ └── vaultwarden.yml
│ ├── vpn
│ │ ├── .env-example
│ │ └── vpn.yml
│ ├── wallos
│ │ ├── .env-example
│ │ └── wallos.yml
│ ├── zigbee2mqtt
│ │ ├── .env-example
│ │ └── zigbee2mqtt.yml
│ └── zwavejs
│ │ ├── .env-example
│ │ └── zwavejs.yml
├── dashy-config.yml <------ Configuration for Dashy the dashboard
├── docker-compose.yml <------ Main compose file. Add includes here
├── scripts <------ Helper scripts directory
│ ├── README.md
│ ├── config-check.sh
│ ├── copyenv.sh
│ ├── hassio.sh
│ ├── startup.sh
│ └── tearDown.sh
└── traefik-data <---- Traefik config files (do not delete if you want to use traefik)
├── acme.json
├── config.yml
└── traefik.yml
Why?
This allows for services to be added and removed extremely easily. If you want to add a new yml of your own to this, it is literally just a matter of adding the item to the include: array.
Each compose file is sorted into its own directory with its own .env-example file to get you started. There are some variables in the root .env file that will need to be shared across the containers.
Compose Profiles
Every yml file is just a docker-compose service, network configuration, or volume configuration. The services have a profiles array that makes the COMPOSE_PROFILES environment variable work. Those profiles allow you to spin up only the services you specify.
Variable Setup
When setting up the COMPOSE_PROFILES env variable (required), you will have to make some decisions about how you want your containers to be added and what all you want to use in a container. Almost every service (except media servers) has the all profile so if you just want everything in the project, set the COMPOSE_PROFILES to all and move on. Otherwise, you can pick and choose what you want.
Example
- All containers with the
allprofile. And a media server (jellyfin as an example)
COMPOSE_PROFILES=all,jellyfin
- Only a few Containers
COMPOSE_PROFILES=vpn,transmission,sonarr,radarr,jellyfin,dashy,homeAutomation
## homeAutomation spins up 3 containers - see below
Compose Profile Options
These are all possible profile options you can use for the associated services.
| Service | Profiles |
|---|---|
| Authentik | authentik,all |
| Bookstack/BookstackDB | bookstack, all |
| Dashy | dashy, all |
| Duplicati | duplicati, all |
| Emby | emby |
| Heimdall | heimdall, all |
| Home Assistant | homeassistant, homeAutomation, all |
| Jackett | jackett |
| Jellyfin | jellyfin |
| Jellyseerr | jellyseerr, all |
| Komga | komga, all |
| Lidarr | lidarr, all |
| Mattermost | mattermost, all |
| Mealie | mealie, all |
| Navidrome | navidrome, all |
| PiHole | pihole, all |
| Plex | plex |
| Portainer | portainer, all |
| Prowlarr | prowlarr, all, sonarr, radarr, lidarr |
| Radarr | radarr, all |
| Sonarr | sonarr, all |
| Traefik | traefik, all |
| Transmission | transmission, all |
| Vaultwarden | vaultwarden, all |
| VPN | vpn, all |
| Wallos | wallos, all |
| Zigbee2MQTT | zigbee2mqtt, homeAutomation, all |
| ZwaveJS | zwavejs, homeAutomation, all |