Skip to content

Commit

Permalink
Merge pull request #22 from sonofborge/release_v0.7
Browse files Browse the repository at this point in the history
Release v0.7
  • Loading branch information
bryborge authored May 12, 2022
2 parents bdd34be + 6e8679d commit 97d8b8a
Show file tree
Hide file tree
Showing 6 changed files with 144 additions and 34 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ appdata/authelia/configuration.yml
appdata/authelia/notification.txt
appdata/authelia/users.yml

# Heimdall
appdata/heimdall/*

# Plex
appdata/plex/config/Library

Expand Down
7 changes: 0 additions & 7 deletions LICENSE

This file was deleted.

14 changes: 14 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Copyright 2022 Bryan Borgeson

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
130 changes: 103 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,61 @@
# DockServ
<div align="center">
<br />
<h1 align="center">DockServ</h1>
<p align="center">
A centralized place to define, manage, and orchestrate home server applications behind a reverse proxy.
<br />
<br />
<a href="https://github.com/sonofborge/dockserv"><strong>Explore the docs »</strong></a>
</p>
<br />
</div>

## Table of Contents

<details>
<summary>Show/Hide</summary>
<ol>
<li>
<a href="#about-the-project">About The Project</a>
<ul>
<li><a href="#built-with">Built With</a></li>
</ul>
</li>
<li>
<a href="#getting-started">Getting Started</a>
<ul>
<li><a href="#prerequisites">Prerequisites</a></li>
<li><a href="#installation">Installation</a></li>
</ul>
</li>
<li>
<a href="#adding-content-to-plex-from-a-network-share">Adding Content to Plex from a Network Share</a>
<ul>
<li><a href="#on-the-nas">On the NAS</a></li>
<li><a href="#on-the-dockserv-host">On the DockServ Host</a></li>
</ul>
</li>
<li>
<a href="#license">License</a>
</li>
</ol>
</details>

## About the Project

DockServ is a stack of containerized open-source web applications served behind a reverse proxy service.

A centralized place to define, manage, and orchestrate home server applications behind a reverse proxy.
This project was heavily
influenced by
[this](https://www.smarthomebeginner.com/traefik-2-docker-tutorial/)
tutorial and
[this](https://github.com/htpcBeginner/docker-traefik)
project.

## Built With
### Built With

* [Docker](https://docs.docker.com/get-docker/) - Engine for building/containerizing applications
* [Docker-Compose](https://docs.docker.com/compose/install/) - Container orchestration tool
* [Docker](https://docs.docker.com/get-docker/) - Engine for building/containerizing applications.
* [Traefik Proxy](https://doc.traefik.io/traefik/) - Edge Router that makes publishing your services a fun and easy experience.

## Getting Started

Expand All @@ -21,70 +65,102 @@ deploying to.

### Prerequisites

* A live system running [Ubuntu Server](https://ubuntu.com/download/server)
* A router configured to forward ports `:80` and `:443` for the Public IP of the live system
* A domain provided by [Cloudflare](https://www.cloudflare.com)
* A live system running a linux distribution (like [Ubuntu Server](https://ubuntu.com/download/server))
* A router configured to forward ports `:80`, `:443`, and `:32400` of the live system
* A web domain provided by [Cloudflare](https://www.cloudflare.com)
* Docker
* Docker Compose
* Git

### Installing
### Installation

1. Clone the project and change into the project directory.

```shell
git clone git@github.com:sonofborge/dockserv.git && cd dockserv
```

2. Create a new `.env` file and add the values to the variables to fit your needs.
2. Create a new `.env` file and edit the environment variable values to suit your configuration.

```shell
cp .env{.dist,}
```

3. Create the docker networks.

```shell
docker network create reverse_proxy
docker network create socket_proxy
```

4. Run the Authelia setup script and follow the on-screen instructions.
3. Run the Authelia setup script and follow the on-screen instructions.

```shell
bash scripts/setup-authelia.sh
```

5. Run the Redis setup script and follow the on-screen instructions.
4. Run the Redis setup script and follow the on-screen instructions.

```shell
bash scripts/setup-redis.sh
```

6. Run the Postgres setup script and follow the on-screen instructions.
5. Run the Postgres setup script and follow the on-screen instructions.

```shell
bash scripts/setup-postgres.sh
```

7. Spin up some or all of your server applications with docker-compose.
6. Spin up some or all of your server applications with `docker compose`.

```shell
# Example: specific individual applications
docker-compose up socket_proxy -d
docker-compose up traefik
docker compose up socket_proxy -d
docker compose up traefik
```

```shell
# Example: all applications
docker-compose up -d
docker compose up -d
```

8. If you're logging into Authelia for the first time, you'll need to setup totp.
7. If you're logging into Authelia for the first time, you'll need to setup totp.
After you've added your credentials, click on "Not registered yet?" and follow the instructions to register another
device for authorization.
The email it sends can be found in `appdata/authelia/notification.txt`.
### Adding Content to Plex from a Network Share
Assuming you are using Network Attached Storage (NAS) to house the content you want Plex to serve,
you will need to make some additional changes to the host in order to share that content with the Plex shared volume.
#### On the NAS
Enable [Network File System (NFS)](https://help.ubuntu.com/lts/serverguide/network-file-system.html).
#### On the DockServ Host
1. Ensure that the `nfs-common` library is installed.
```shell
sudo apt update && sudo apt install nfs-common
```
2. Edit `/etc/fstab` and tell it where it can find the network shared folders.
Add the following line, substituting the NAS local IP and the name of the shared files:
```shell
...
192.168.1.<XXX>:</path/to/share_name> /media/nas/<share_name> nfs auto,defaults,nofail 0 0
```
Add as many shares as you want Plex to have access to, save, and exit.
3. Make the `<share_name>` folder.
```shell
sudo mkdir -p /media/nas/<share_name>
```
4. Finally, mount the drives.
```sh
sudo mount -a
```
The media should now be shared with the docker volume and available on the host at `/media/nas`.
## License
Expand Down
Empty file added appdata/heimdall/.gitkeep
Empty file.
24 changes: 24 additions & 0 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,30 @@ services:
pid: host
restart: unless-stopped

##
# Heimdall
# A dashboard for all your web applications.
# For more info:
# - https://heimdall.site/
heimdall:
image: lscr.io/linuxserver/heimdall
container_name: heimdall
environment:
- PUID=${PLEX_UID}
- PGID=${PLEX_GID}
- TZ=${TZ}
labels:
- traefik.enable=true
- traefik.http.routers.heimdall-rtr.entrypoints=https
- traefik.http.routers.heimdall-rtr.rule=Host(`apps.${DOMAIN_NAME}`)
- traefik.http.routers.heimdall-rtr.middlewares=chain-authelia@file
- traefik.http.routers.heimdall-rtr.service=heimdall-svc
- traefik.http.services.heimdall-svc.loadbalancer.server.port=80
networks:
- reverse_proxy
volumes:
- $DOCKER_DIR/appdata/heimdall:/config

##
# Plex
# A global streaming media service and client-server media platform.
Expand Down

0 comments on commit 97d8b8a

Please sign in to comment.