Skip to content

Commit

Permalink
✨ stacks
Browse files Browse the repository at this point in the history
  • Loading branch information
juftin committed Apr 5, 2024
1 parent 5bc9945 commit b4be6a2
Show file tree
Hide file tree
Showing 35 changed files with 140 additions and 121 deletions.
36 changes: 18 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@
secrets/

# Media Center
media-center/heimdall/config/
media-center/jackett/config/
media-center/ombi/config/
media-center/plex/config/
media-center/portainer/config/
media-center/radarr/config/
media-center/sonarr/config/
media-center/tautulli/config/
media-center/transmission/config/
media-center/calibre/config/
media-center/nzbget/config/
media-center/prowlarr/config/
media-center/readarr/config/
media-center/calibre-web/config/
media-center/sftpgo/config/
media-center/sftpgo/data/
stacks/media-center/heimdall/config/
stacks/media-center/jackett/config/
stacks/media-center/ombi/config/
stacks/media-center/plex/config/
stacks/media-center/portainer/config/
stacks/media-center/radarr/config/
stacks/media-center/sonarr/config/
stacks/media-center/tautulli/config/
stacks/media-center/transmission/config/
stacks/media-center/calibre/config/
stacks/media-center/nzbget/config/
stacks/media-center/prowlarr/config/
stacks/media-center/readarr/config/
stacks/media-center/calibre-web/config/
stacks/media-center/sftpgo/config/
stacks/media-center/sftpgo/data/
# Traefik
traefik/traefik/config/
stacks/traefik/traefik/config/
# Miscellaneous
miscellaneous/pihole/config/
stacks/miscellaneous/pihole/config/

__pycache__/
*.py[cod]
Expand Down
64 changes: 32 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,43 +36,43 @@ This repository is a large [docker compose](https://docs.docker.com/compose/)
project that allows you to deploy a variety of services to your homelab.

At the root of this repository is a `docker-compose.yaml` file that defines
all of the services that are included in this project - collections of services
are broken out into their own subdirectories and individual
`docker-compose.yaml` files (`media-center/docker-compose.yaml`). Below that,
each service gets its own subdirectory and a singular `docker-compose.yaml` file
(`media-center/plex/docker-compose.yaml`). Using the `include` directive in the
the entire homelab project - collections of services are broken out into their
own subdirectories inside of the `stacks` directory. Under each stack,
every service gets its own subdirectory and a singular `docker-compose.yaml` file
(`stacks/media-center/plex/docker-compose.yaml`). Using the `include` directive in the
docker compose files, we create a single stack from the top level that deploys
everything.

```text
.
├── .env # Environment Variables and Configuration
├── docker-compose.yaml # Main Docker Compose File
├── Makefile # Makefile for common tasks and docker compose wrappers
├── secrets # Secret Files
│ ├── cloudflare_api_key.secret # Cloudflare API Key
│ └── google_oauth.secret # Google OAuth Credentials and Whitelist
├── media-center
│ ├── docker-compose.yaml # Media-Center Stack Docker Compose File (Plex, Sonarr, etc.)
│ ├── plex # Each individual service has its own subdirectory
│ │ ├── docker-compose.yaml # Each service has its own docker-compose.yaml file
│ │ └── config # Each service has its own config directory where data is persisted
│ └── sonarr
│ └── docker-compose.yaml
├── traefik # Traefik Reverse Proxy and OAuth
│ ├── docker-compose.yaml # Traefik Stack Docker Compose File (Traefik, OAuth, etc.)
│ ├── oauth # OAuth Configuration
│ │ └── docker-compose.yaml
│ └── traefik # Traefik Configuration
│ ├── docker-compose.yaml # Traefik Docker Compose File (Traefik Only)
│ └── rules
│ ├── middlewares-chains.yml # Traefik Middlewares Chains
│ ├── middlewares.yml # Traefik Middlewares
│ └── tls-opts.yml # Traefik TLS Options
└── miscellaneous # Non Media Center Services (pihole, chat-gpt-next-web, etc.)
├── chat-gpt-next-web
│ └── docker-compose.yaml
└── docker-compose.yaml # Miscellaneous Stack Docker Compose File
├── docker-compose.yaml # Main Docker Compose File
├── .env # Environment Variables and Configuration
├── Makefile # Makefile for common tasks and docker compose wrappers
├── secrets # Secret Files
│ ├── cloudflare_api_key.secret # Cloudflare API Key
│ └── google_oauth.secret # Google OAuth Credentials and Whitelist
└── stacks
├── media-center
│ ├── docker-compose.yaml # Media-Center Stack Docker Compose File (Plex, Sonarr, etc.)
│ ├── plex # Each individual service has its own subdirectory
│ │ ├── docker-compose.yaml # Each service has its own docker-compose.yaml file
│ │ └── config # Each service has its own config directory where data is persisted
│ └── sonarr
│ └── docker-compose.yaml
├── traefik # Traefik Reverse Proxy and OAuth
│ ├── docker-compose.yaml # Traefik Stack Docker Compose File (Traefik, OAuth, etc.)
│ ├── oauth # OAuth Configuration
│ │ └── docker-compose.yaml
│ └── traefik # Traefik Configuration
│ ├── docker-compose.yaml # Traefik Docker Compose File (Traefik Only)
│ └── rules
│ ├── middlewares-chains.yml # Traefik Middlewares Chains
│ ├── middlewares.yml # Traefik Middlewares
│ └── tls-opts.yml # Traefik TLS Options
└── miscellaneous # Non Media Center Services (pihole, chat-gpt-next-web, etc.)
├── docker-compose.yaml # Miscellaneous Stack Docker Compose File
└── chat-gpt-next-web
└── docker-compose.yaml
```

### Configuration
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
####################################

include:
- traefik/docker-compose.yaml
- media-center/docker-compose.yaml
- miscellaneous/docker-compose.yaml
- stacks/traefik/docker-compose.yaml
- stacks/media-center/docker-compose.yaml
- stacks/miscellaneous/docker-compose.yaml

####################################
# CONFIGURATION
Expand Down
4 changes: 2 additions & 2 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ in the root `docker-compose.yaml` file.
To disable specific apps in the `media-center` stack, you would comment out the `include` directive
in the `media-center/docker-compose.yaml` file.

<details><summary>📄 media-center/docker-compose.yaml</summary>
<details><summary>📄 stacks/media-center/docker-compose.yaml</summary>
<p>

```yaml
--8<-- "media-center/docker-compose.yaml"
--8<-- "stacks/media-center/docker-compose.yaml"
```

</p>
Expand Down
64 changes: 32 additions & 32 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,43 +34,43 @@ This repository is a large [docker compose](https://docs.docker.com/compose/)
project that allows you to deploy a variety of services to your homelab.

At the root of this repository is a `docker-compose.yaml` file that defines
all of the services that are included in this project - collections of services
are broken out into their own subdirectories and individual
`docker-compose.yaml` files (`media-center/docker-compose.yaml`). Below that,
each service gets its own subdirectory and a singular `docker-compose.yaml` file
(`media-center/plex/docker-compose.yaml`). Using the `include` directive in the
the entire homelab project - collections of services are broken out into their
own subdirectories inside of the `stacks` directory. Under each stack,
every service gets its own subdirectory and a singular `docker-compose.yaml` file
(`stacks/media-center/plex/docker-compose.yaml`). Using the `include` directive in the
docker compose files, we create a single stack from the top level that deploys
everything.

```text
.
├── .env # Environment Variables and Configuration
├── docker-compose.yaml # Main Docker Compose File
├── Makefile # Makefile for common tasks and docker compose wrappers
├── secrets # Secret Files
│ ├── cloudflare_api_key.secret # Cloudflare API Key
│ └── google_oauth.secret # Google OAuth Credentials and Whitelist
├── media-center
│ ├── docker-compose.yaml # Media-Center Stack Docker Compose File (Plex, Sonarr, etc.)
│ ├── plex # Each individual service has its own subdirectory
│ │ ├── docker-compose.yaml # Each service has its own docker-compose.yaml file
│ │ └── config # Each service has its own config directory where data is persisted
│ └── sonarr
│ └── docker-compose.yaml
├── traefik # Traefik Reverse Proxy and OAuth
│ ├── docker-compose.yaml # Traefik Stack Docker Compose File (Traefik, OAuth, etc.)
│ ├── oauth # OAuth Configuration
│ │ └── docker-compose.yaml
│ └── traefik # Traefik Configuration
│ ├── docker-compose.yaml # Traefik Docker Compose File (Traefik Only)
│ └── rules
│ ├── middlewares-chains.yml # Traefik Middlewares Chains
│ ├── middlewares.yml # Traefik Middlewares
│ └── tls-opts.yml # Traefik TLS Options
└── miscellaneous # Non Media Center Services (pihole, chat-gpt-next-web, etc.)
├── chat-gpt-next-web
│ └── docker-compose.yaml
└── docker-compose.yaml # Miscellaneous Stack Docker Compose File
├── docker-compose.yaml # Main Docker Compose File
├── .env # Environment Variables and Configuration
├── Makefile # Makefile for common tasks and docker compose wrappers
├── secrets # Secret Files
│ ├── cloudflare_api_key.secret # Cloudflare API Key
│ └── google_oauth.secret # Google OAuth Credentials and Whitelist
└── stacks
├── media-center
│ ├── docker-compose.yaml # Media-Center Stack Docker Compose File (Plex, Sonarr, etc.)
│ ├── plex # Each individual service has its own subdirectory
│ │ ├── docker-compose.yaml # Each service has its own docker-compose.yaml file
│ │ └── config # Each service has its own config directory where data is persisted
│ └── sonarr
│ └── docker-compose.yaml
├── traefik # Traefik Reverse Proxy and OAuth
│ ├── docker-compose.yaml # Traefik Stack Docker Compose File (Traefik, OAuth, etc.)
│ ├── oauth # OAuth Configuration
│ │ └── docker-compose.yaml
│ └── traefik # Traefik Configuration
│ ├── docker-compose.yaml # Traefik Docker Compose File (Traefik Only)
│ └── rules
│ ├── middlewares-chains.yml # Traefik Middlewares Chains
│ ├── middlewares.yml # Traefik Middlewares
│ └── tls-opts.yml # Traefik TLS Options
└── miscellaneous # Non Media Center Services (pihole, chat-gpt-next-web, etc.)
├── docker-compose.yaml # Miscellaneous Stack Docker Compose File
└── chat-gpt-next-web
└── docker-compose.yaml
```

[traefik]: https://github.com/traefik/traefik
Expand Down
21 changes: 20 additions & 1 deletion docs/migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,33 @@ When larger changes are made this project there are occasionally migrations that
need to be run. These are mostly for updating the directory structure and
will be minimized as much as possible.

## 1.5.0

The 1.5.0 release moves all docker compose stacks under a `stacks` directory.

<details><summary>1.4.0 to 1.5.0 Migration</summary>
<p>

```shell
#!/usr/bin/env bash

mkdir -p stacks
mv traefik stacks/traefik
mv media-center stacks/media-center
mv miscellaneous stacks/miscellaneous
```

</p>
</details>

## 1.0.0

The `1.0.0` release introduces a pivotal update for existing users of the homelab project.
This update mandates the creation of a new config directory within each service directory,
deviating from the previous approach of directly mounting the service directory into the container.
This change is designed to enhance organization and management of service configurations.

<details><summary>1.0.0 Migration</summary>
<details><summary>0.5.2 to 1.0.0 Migration</summary>
<p>

```shell
Expand Down
4 changes: 2 additions & 2 deletions docs/traefik.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ The below example shows you how to create a new service in the docker compose
stack and make it accessible via Traefik. In this example, we are creating a
Jupyter notebook service that can be accessed at `jupyter.example.com`.

=== "miscellaneous/jupyter/docker-compose.yaml"
=== "stacks/miscellaneous/jupyter/docker-compose.yaml"

```yaml
####################################
Expand All @@ -152,7 +152,7 @@ Jupyter notebook service that can be accessed at `jupyter.example.com`.
traefik.http.routers.jupyter-rtr.middlewares: chain-oauth-google@file
```

=== "miscellaneous/docker-compose.yaml"
=== "stacks/miscellaneous/docker-compose.yaml"

```yaml
################################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ services:
image: lscr.io/linuxserver/calibre-web:latest
hostname: ${CALIBRE_WEB_SUBDOMAIN:-calibre-web}
volumes:
- ${DOCKER_DIRECTORY}/media-center/calibre-web/config:/config
- ${DOCKER_DIRECTORY}/stacks/media-center/calibre-web/config:/config
- ${BOOKS_DIR}:/books
- ${DOCKER_DIRECTORY}/media-center/calibre/config:/calibre-config
- ${DOCKER_DIRECTORY}/stacks/media-center/calibre/config:/calibre-config
environment:
PUID: ${PUID}
PGID: ${PGID}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
image: lscr.io/linuxserver/calibre:latest
hostname: ${CALIBRE_SUBDOMAIN:-calibre}
volumes:
- ${DOCKER_DIRECTORY}/media-center/calibre/config:/config
- ${DOCKER_DIRECTORY}/stacks/media-center/calibre/config:/config
- ${BOOKS_DIR}:/books
- ${COMPLETED_DOWNLOADS}:/downloads
environment:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
container_name: heimdall
image: lscr.io/linuxserver/heimdall:latest
volumes:
- ${DOCKER_DIRECTORY}/media-center/heimdall/config:/config
- ${DOCKER_DIRECTORY}/stacks/media-center/heimdall/config:/config
environment:
PUID: ${PUID}
PGID: ${PGID}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
image: lscr.io/linuxserver/nzbget:latest
hostname: ${NZGGET_DOMAIN:-nzbget}.${DOMAIN_NAME}
volumes:
- ${DOCKER_DIRECTORY}/media-center/nzbget/config:/config
- ${DOCKER_DIRECTORY}/stacks/media-center/nzbget/config:/config
- ${COMPLETED_DOWNLOADS}:/downloads/completed
environment:
PUID: ${PUID}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
PGID: ${PGID}
TZ: ${TZ}
volumes:
- ${DOCKER_DIRECTORY}/media-center/ombi/config:/config
- ${DOCKER_DIRECTORY}/stacks/media-center/ombi/config:/config
security_opt:
- no-new-privileges:true
restart: ${UNIVERSAL_RESTART_POLICY:-unless-stopped}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ services:
image: lscr.io/linuxserver/plex:latest
network_mode: host
volumes:
- ${DOCKER_DIRECTORY}/media-center/plex/config:/config
- ${DOCKER_DIRECTORY}/stacks/media-center/plex/config:/config
- ${TV_DIR}:/tv
- ${MOVIE_DIR}:/movies
- ${DOCKER_DIRECTORY}/media-center/shared:/shared
- ${DOCKER_DIRECTORY}/stacks/media-center/shared:/shared
- ${PLEX_TRANSCODE_DIR:-/tmp}:/transcode
- ${BOOKS_DIR}:/books
devices:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ services:
image: portainer/portainer-ce:latest
hostname: ${PORTAINER_SUBDOMAIN:-portainer}
volumes:
- ${DOCKER_DIRECTORY}/media-center/portainer/config:/data
- ${DOCKER_DIRECTORY}/media-center/shared:/shared
- ${DOCKER_DIRECTORY}/stacks/media-center/portainer/config:/data
- ${DOCKER_DIRECTORY}/stacks/media-center/shared:/shared
command: -H tcp://socket-proxy:2375
environment:
TZ: ${TZ}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
image: lscr.io/linuxserver/prowlarr:develop
hostname: ${PROWLARR_SUBDOMAIN:-prowlarr}
volumes:
- ${DOCKER_DIRECTORY}/media-center/prowlarr/config:/config
- ${DOCKER_DIRECTORY}/stacks/media-center/prowlarr/config:/config
environment:
PUID: ${PUID}
PGID: ${PGID}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ services:
image: lscr.io/linuxserver/radarr:latest
hostname: ${RADARR_SUBDOMAIN:-radarr}
volumes:
- ${DOCKER_DIRECTORY}/media-center/radarr/config:/config
- ${DOCKER_DIRECTORY}/stacks/media-center/radarr/config:/config
- ${COMPLETED_DOWNLOADS}:/downloads
- ${MOVIE_DIR}:/movies
- ${DOCKER_DIRECTORY}/media-center/shared:/shared
- ${DOCKER_DIRECTORY}/stacks/media-center/shared:/shared
environment:
PUID: ${PUID}
PGID: ${PGID}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ services:
image: lscr.io/linuxserver/readarr:develop
hostname: ${READARR_SUBDOMAIN:-readarr}
volumes:
- ${DOCKER_DIRECTORY}/media-center/readarr/config:/config
- ${DOCKER_DIRECTORY}/stacks/media-center/readarr/config:/config
- ${COMPLETED_DOWNLOADS}:/downloads
- ${BOOKS_DIR}:/books
- ${DOCKER_DIRECTORY}/media-center/calibre/config:/calibre
- ${DOCKER_DIRECTORY}/stacks/media-center/calibre/config:/calibre
environment:
PUID: ${PUID}
PGID: ${PGID}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ services:
- ${MOVIE_DIR}:/srv/sftpgo/data/juftin/movies
- ${TV_DIR}:/srv/sftpgo/data/juftin/tv
- ${BOOKS_DIR}:/srv/sftpgo/data/juftin/books
- ${DOCKER_DIRECTORY}/media-center/sftpgo/data/:/srv/sftpgo/data/juftin/upload
- ${DOCKER_DIRECTORY}/media-center/sftpgo/config/:/var/lib/sftpgo/
- ${DOCKER_DIRECTORY}/stacks/media-center/sftpgo/data/:/srv/sftpgo/data/juftin/upload
- ${DOCKER_DIRECTORY}/stacks/media-center/sftpgo/config/:/var/lib/sftpgo/
environment:
PUID: ${PUID}
PGID: ${PGID}
Expand Down
Loading

0 comments on commit b4be6a2

Please sign in to comment.