Skip to content

Commit

Permalink
feat: #15 Use Docker Compose profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienPoupa committed Nov 10, 2023
1 parent 118159e commit 8020526
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
COMPOSE_FILE=docker-compose.yml
COMPOSE_PATH_SEPARATOR=:
COMPOSE_PROFILES=
COMPOSE_FILE=docker-compose.yml:adguardhome/docker-compose.yml:flaresolverr/docker-compose.yml:sabnzbd/docker-compose.yml
USER_ID=1000
GROUP_ID=1000
TIMEZONE="America/New_York"
Expand Down
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ I am running it in Ubuntu Server 22.04; I also tested this setup on a [Synology
| [Homepage](https://gethomepage.dev) | Application dashboard | [gethomepage/homepage](https://github.com/gethomepage/homepage/pkgs/container/homepage) | / |
| [Traefik](https://traefik.io) | Reverse proxy | [traefik](https://hub.docker.com/_/traefik) | |
| [Watchtower](https://containrrr.dev/watchtower/) | Automated Docker images update | [containrrr/watchtower](https://hub.docker.com/r/containrrr/watchtower) | |
| [Autoheal](https://github.com/willfarrell/docker-autoheal/) | Monitor and restart unhealthy docker containers | [willfarrell/autoheal](https://hub.docker.com/r/willfarrell/autoheal) | |
| [Autoheal](https://github.com/willfarrell/docker-autoheal/) | Monitor and restart unhealthy Docker containers | [willfarrell/autoheal](https://hub.docker.com/r/willfarrell/autoheal) | |
| [SABnzbd](https://sabnzbd.org/) | Optional - Free and easy binary newsreader | [linuxserver/sabnzbd](https://hub.docker.com/r/linuxserver/sabnzbd) | /sabnzbd |
| [FlareSolverr](https://github.com/FlareSolverr/FlareSolverr) | Optional - Proxy server to bypass Cloudflare protection in Prowlarr | [flaresolverr/flaresolverr](https://hub.docker.com/r/flaresolverr/flaresolverr) | |
| [AdGuard Home](https://adguard.com/en/adguard-home/overview.html) | Optional - Network-wide software for blocking ads & tracking | [adguard/adguardhome](https://hub.docker.com/r/adguard/adguardhome) | |
Expand All @@ -87,8 +87,8 @@ If you want to show Jellyfin information in the homepage, create it in Jellyfin

| Variable | Description | Default |
|--------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| `COMPOSE_FILE` | Docker compose files to load | `docker-compose.yml` |
| `COMPOSE_PATH_SEPARATOR` | Path separator between compose files to load | `:` |
| `COMPOSE_FILE` | Docker compose files to load | |
| `COMPOSE_PROFILES` | Docker compose profiles to load | `` |
| `USER_ID` | ID of the user to use in Docker containers | `1000` |
| `GROUP_ID` | ID of the user group to use in Docker containers | `1000` |
| `TIMEZONE` | TimeZone used by the container. | `America/New_York` |
Expand Down Expand Up @@ -294,23 +294,29 @@ and from the outside you need to connect to Tailscale first, then the NAS domain

## Optional Services

As their name would suggest, optional services are not launched by default. They have their own `docker-compose.yml` file
in their subfolders. To enable a service, append it to the `COMPOSE_FILE` environment variable.
As their name would suggest, optional services are not launched by default.
To enable a service, append its profile name to the `COMPOSE_PROFILES` environment variable.

Say you want to enable FlareSolverr, you should have `COMPOSE_FILE=docker-compose.yml:flaresolverr/docker-compose.yml`
Say you want to enable FlareSolverr, you should have `COMPOSE_PROFILES=flaresolverr`.

Additional services can be enabled separated by commas: `COMPOSE_PROFILES=flaresolverr,adguardhome`.

### FlareSolverr

In Prowlarr, add the FlareSolverr indexer with the URL http://flaresolverr:8191/

### SABnzbd

Enable SABnzbd by setting `COMPOSE_FILE=docker-compose.yml:sabnzbd/docker-compose.yml`. It will be accessible at `/sabnzbd`.
Enable SABnzbd by setting `COMPOSE_PROFILES=sabnzbd`. It will be accessible at `/sabnzbd`.

If that is not the case, the `url_base` parameter in `sabnzbd.ini` should be set to `/sabnzbd`.

Additionally, `host_whitelist` value should be set to your hostname.

### AdGuard Home

Enable AdGuard Home by setting `COMPOSE_PROFILES=adguardhome`.

Set the `ADGUARD_HOSTNAME`, I chose a different subdomain to use secure DNS without the folder.

On first run, specify the port 3000 and enable listen on all interfaces to make it work with Tailscale.
Expand Down
6 changes: 6 additions & 0 deletions adguardhome/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ services:
- NET_ADMIN
network_mode: host
mem_reservation: 6m
profiles:
- adguardhome

adguardhome:
image: adguard/adguardhome
Expand Down Expand Up @@ -48,6 +50,8 @@ services:
- homepage.widget.url=https://${ADGUARD_HOSTNAME}
- homepage.widget.username=${ADGUARD_USERNAME}
- homepage.widget.password=${ADGUARD_PASSWORD}
profiles:
- adguardhome

traefik-certs-dumper:
image: ldez/traefik-certs-dumper
Expand All @@ -65,6 +69,8 @@ services:
volumes:
- ./letsencrypt:/data
- ./adguardhome/certs:/certs
profiles:
- adguardhome

networks:
adguardhome:
Expand Down
2 changes: 2 additions & 0 deletions flaresolverr/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ services:
- traefik.http.routers.flaresolverr.rule=PathPrefix(`/flaresolverr`)
- traefik.http.routers.flaresolverr.tls=true
- traefik.http.services.flaresolverr.loadbalancer.server.port=8191
profiles:
- flaresolverr
2 changes: 2 additions & 0 deletions sabnzbd/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ services:
- homepage.href=/sabnzbd
- homepage.description=Usenet
- homepage.weight=6
profiles:
- sabnzbd

0 comments on commit 8020526

Please sign in to comment.