Commit 153331bb authored by Nick Busey's avatar Nick Busey

Adding built docs site for easier deployment, adding Paperless

parent 0a67cd11
# Deploy HomelabOS
deploy:
ansible-playbook -i hosts -t homelabos homelabos.yml
# Build the HomelabOs Documentation - Requires mkdocs with the Material Theme
build:
mkdocs build
......@@ -15,11 +15,15 @@ To make it easy for anyone to own all their data in an easy and secure way, with
## Features
* One command depyloment
* Automated HTTPS endpoints (Coming Soon)
* Automated Backups (Coming Soon)
* Easy Restore (Coming Soon)
* Dynamic DNS Support (Coming Soon)
* Automated Apple Health Import (Coming Soon)
## Planned Features
* Automated HTTPS endpoints
* Automated Backups
* Easy Restore
* Dynamic DNS Support
* Automated Apple Health Import
* Automated LDAP Sync
## Demo
......@@ -33,23 +37,25 @@ To make it easy for anyone to own all their data in an easy and secure way, with
* [Darksky](http://darksky.net/) - Local weather reported via [darksky-influxdb](https://github.com/ErwinSteffens/darksky-influxdb)
* Documentation - Offline, searchable documentation via [MkDocs](https://www.mkdocs.org/)
* [Emby](https://emby.media/) - Media player
* [Firefly III](https://firefly-iii.org/) - Money management budgeting app
* [Gitea](https://gitea.io/en-US/) - Git hosting
* [Grafana](https://grafana.com/) - Pretty graphs
* [Home Assistant](https://www.home-assistant.io/) - Home Aatomation
* [InfluxDB](https://www.influxdata.com/time-series-platform/influxdb/) - Time series data storage
* [NextCloud](https://nextcloud.com/) - Private Cloud Storage, Calendar, Contacts, LDAP, etc.
* [NextCloud](https://nextcloud.com/) - Private Cloud Storage, Calendar, Contacts, etc.
* [Pi-hole](https://pi-hole.net/) - Ad blocking
* [Paperless](https://github.com/danielquinn/paperless) - Document management
* [Portainer](https://www.portainer.io/) - Easy Docker management
* [Sonerezh](https://www.sonerezh.bzh/) - Music streaming and library management
* [Telegraf](https://www.influxdata.com/time-series-platform/telegraf/) - Server statistics reporting
* [Terminal](georgeyord/butterfly-web-terminal) - Web based terminal access
* [Transmission](https://transmissionbt.com/) - BitTorrent client
### Coming Soon
* BitWarden - Password manager
* BulletNotes - Note taking knowledgebase with kanban and calendar functionality.
* OwnTracksRecorder - https://github.com/owntracks/recorder
* Paperless - Document management https://paperless.readthedocs.io/en/latest/setup.html#installation-configuration
* [Transmission](https://transmissionbt.com/) - BitTorrent client via [https://github.com/haugene/docker-transmission-openvpn](https://github.com/haugene/docker-transmission-openvpn)
## Requirements
......@@ -63,7 +69,9 @@ Ansible version 2.5+ installed on your computer (not the server).
## Installation
From your computer (not the server) run `ansible-playbook -i hosts homelabos.yml`.
Set your settings in `host_vars/myserver`. You can find the default settings in `group_vars/homelabos`.
From your computer (not the server) simply run `make`.
## Contributing
......@@ -73,4 +81,6 @@ Please do!
Follow the [MkDocs Material Theme setup directions](https://squidfunk.github.io/mkdocs-material/getting-started/).
Then run `mkdocs serve`
\ No newline at end of file
Then run `mkdocs serve`.
To build changes to the docs run `make build`.
......@@ -17,3 +17,7 @@ HomelabOS is a collection of various separate services. You can find links to th
### [Home Assistant](http://homeassistant.{{ domain }}/)
[Home Assistant Documentation](https://www.home-assistant.io/docs/)
### [Transmission](http://torrent.{{ domain }}/)
Login with your default username and password `transmission`
\ No newline at end of file
......@@ -4,10 +4,10 @@
- hosts: all
become: True
gather_facts: True
tags: docker
tags: common
roles:
- docker
- common
- hosts: all
become: True
......@@ -16,4 +16,4 @@
roles:
- homelabos
# - transmission
- transmission
......@@ -4,6 +4,7 @@
path: "/var/homelabos/{{ item }}"
state: directory
loop:
- chronograf
- docker
- docs
- docs/docs
......@@ -19,6 +20,7 @@
- pihole
- pihole/config
- pihole/dnsmasq.d
- portainer
- sonerezh/thumbnails
- sonerezh_db
- telegraf
......@@ -28,6 +30,9 @@
- transmission/downloads
- transmission/watch
- name: Configure docs
copy: src=site dest=/var/homelabos/docs
- name: Configure Telegraf.
template: src=telegraf.conf dest=/var/homelabos/telegraf/telegraf.conf
......@@ -53,7 +58,7 @@
src: docker-compose.yml
dest: /var/homelabos/docker/docker-compose.yml
- name: Pull latest HomelabOS service docker images.
- name: Pull latest HomelabOS service docker images. (This could take a while the first time, it has to download quite a bit.)
command: docker-compose -f /var/homelabos/docker/docker-compose.yml pull
- name: Restart HomelabOS service.
......@@ -64,4 +69,7 @@
state: restarted
- debug:
msg: "HomelabOS Installed successfully! Go to http://docs.{{ domain }}/ to get started."
\ No newline at end of file
msg: "HomelabOS Installed successfully! Go to https://{{ domain }}/ to get started."
- debug:
msg: "Problems? File an issue at https://gitlab.com/NickBusey/HomelabOS/issues or join us on irc.freenode.net #HomelabOS"
\ No newline at end of file
......@@ -2,24 +2,32 @@ version: '3'
services:
chronograf:
image: chronograf
restart: always
links:
- influxdb
ports:
- 8888:8888
environment:
- influxdb-url=http://influxdb:8086
labels:
- "traefik.enable=true"
- "traefik.admin.frontend.rule=Host:chronograf.{{ domain }}"
- "traefik.admin.protocol=http"
- "traefik.admin.port=8888"
# Commented out until we can lock it down.
# There is no auth, you can do too much through the interface.
# chronograf:
# image: chronograf
# restart: always
# links:
# - influxdb
# ports:
# - 8888:8888
# volumes:
# - /var/homelabos/chronograf/:/var/lib/chronograf
# entrypoint: 'chronograf --influxdb-url=http://influxdb:8086'
# environment:
# - influxdb-url=http://influxdb:8086
# labels:
# - "traefik.enable=true"
# - "traefik.admin.frontend.rule=Host:chronograf.{{ domain }}"
# - "traefik.admin.frontend.basicAuth=[\"test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/\"]"
# - "traefik.admin.protocol=http"
# - "traefik.admin.port=8888"
convos:
image: nordaaker/convos
restart: always
volumes:
- /var/homelabos/convos:/var/convos
ports:
- 8033:3000
labels:
......@@ -43,22 +51,21 @@ services:
- DARKSKY_LONGITUDE={{ longitude }}
docs:
image: squidfunk/mkdocs-material
image: kyma/docker-nginx
volumes:
- /var/homelabos/docs:/docs
ports:
- 8000:8000
- /var/homelabos/docs/site:/var/www
labels:
- "traefik.enable=true"
- "traefik.admin.frontend.rule=Host:docs.{{ domain }}"
- "traefik.admin.protocol=http"
- "traefik.admin.port=8000"
- "traefik.admin.port=80"
emby:
image: emby/embyserver:latest
restart: always
volumes:
- /var/homelabos/emby:/config
- /mnt/Gangsternas:/mnt/Gangsternas
ports:
- 8096:8096
labels:
......@@ -67,6 +74,39 @@ services:
- "traefik.admin.protocol=http"
- "traefik.admin.port=8096"
firefly_iii_app:
environment:
- FF_DB_HOST=firefly_iii_db
- FF_DB_NAME=firefly_db
- FF_DB_USER=firefly_db
- FF_DB_PASSWORD=firefly_db_secret
- FF_APP_KEY=S0m3R@nd0mStr1ngOf32Ch@rsEx@ctly
- FF_APP_ENV=local
- TZ=America/Denver
image: jc5x/firefly-iii
links:
- firefly_iii_db
ports:
- "8555:80"
volumes:
- /var/homelabos/firefly/export:/var/www/firefly-iii/storage/export
- /var/homelabos/firefly/upload:/var/www/firefly-iii/storage/upload
labels:
- "traefik.enable=true"
- "traefik.admin.frontend.rule=Host:money.{{ domain }}"
- "traefik.admin.protocol=http"
- "traefik.admin.port=80"
firefly_iii_db:
environment:
- MYSQL_DATABASE=firefly_db
- MYSQL_USER=firefly_db
- MYSQL_PASSWORD=firefly_db_secret
- MYSQL_RANDOM_ROOT_PASSWORD=yes
image: "mariadb:latest"
volumes:
- "/var/homelabos/firefly/db:/var/lib/mysql"
freshrss:
image: linuxserver/freshrss
ports:
......@@ -202,41 +242,91 @@ services:
- "traefik.admin.protocol=http"
- "traefik.admin.port=80"
# paperless:
# image: danielquinn/paperless
# restart: always
# ports:
# - 8085:8000
# labels:
# - "traefik.enable=true"
# - "traefik.admin.frontend.rule=Host:paperless.{{ domain }}"
# - "traefik.admin.protocol=http"
# - "traefik.admin.port=8000"
paperless:
image: danielquinn/paperless
restart: always
ports:
- "8325:8000"
healthcheck:
test: ["CMD", "curl" , "-f", "http://localhost:8000"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- /var/homelabos/paperless/data:/usr/src/paperless/data
- /var/homelabos/paperless/media:/usr/src/paperless/media
environment:
- PAPERLESS_OCR_LANGUAGES=
- PAPERLESS_PASSPHRASE=homelabos
command: ["runserver", "--insecure", "--noreload", "0.0.0.0:8000"]
labels:
- "traefik.enable=true"
- "traefik.admin.frontend.rule=Host:paperless.{{ domain }}"
- "traefik.admin.frontend.headers.customFrameOptionsValue=ALLOW-FROM http://{{ domain }}"
- "traefik.admin.protocol=http"
- "traefik.admin.port=8000"
paperless_consumer:
image: danielquinn/paperless
restart: always
depends_on:
- paperless
volumes:
- /var/homelabos/paperless/data:/usr/src/paperless/data
- /var/homelabos/paperless/media:/usr/src/paperless/media
- /mnt/Privatenas/Documents/consume:/consume
- /mnt/Privatenas/Documents/export:/export
environment:
- PAPERLESS_PASSPHRASE=homelabos
command: ["document_consumer"]
# pihole:
# image: diginc/pi-hole:latest
# restart: always
# # volumes:
# # - /var/homelabos/pihole/config:/etc/pihole/
# # - /var/homelabos/pihole/dnsmasq.d:/etc/dnsmasq.d/"
# volumes:
# - /var/homelabos/pihole/config/:/etc/pihole/
# - /var/homelabos/pihole/dnsmasq.d/:/etc/dnsmasq.d/"
# environment:
# - WEBPASSWORD={{ default_password }}
# - VIRTUAL_HOST=pihole.{{ domain }}
# - ServerIP="${IP}"
# - ServerIPv6="${IPv6}"
# ports:
# - 53:53/tcp
# - 53:53/udp
# labels:
# - "traefik.enable=true"
# - "traefik.admin.frontend.rule=Host:pihole.{{ domain }}"
# - "traefik.admin.protocol=http"
# - "traefik.admin.port=80"
portainer:
image: portainer/portainer
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/homelabos/portainer:/data
ports:
- 9000:9000
labels:
- "traefik.enable=true"
- "traefik.admin.frontend.rule=Host:docker.{{ domain }}"
- "traefik.admin.protocol=http"
- "traefik.admin.port=9000"
sonerezh:
image: sonerezh/sonerezh:latest
links:
- sonerezh_db
- sonerezh_db:mysql
volumes:
- /var/homelabos/music:/music
- /mnt/music:/music
- /var/homelabos/sonerezh/thumbnails:/thmubnails
ports:
- 8089:80
environment:
- SONEREZH_DB_PORT_3306_TCP_ADDR=mysql
- SONEREZH_DB_ENV_MYSQL_DATABASE=sonerezh
- SONEREZH_DB_ENV_MYSQL_USER=sonerezh
- SONEREZH_DB_ENV_MYSQL_PASSWORD=motdepasse
labels:
- "traefik.enable=true"
- "traefik.admin.frontend.rule=Host:music.{{ domain }}"
......@@ -287,22 +377,49 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
- /var/homelabos/traefik/traefik.toml:/etc/traefik/traefik.toml
- /var/homelabos/traefik/acme.json:/etc/traefik/acme.json
deploy:
mode: global
placement:
constraints:
- node.role == manager
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
# transmission:
# image: linuxserver/transmission
# volumes:
# - /var/homelabos/transmission/config:/config
# - /var/homelabos/transmission/downloads:/downloads
# - /var/homelabos/transmission/watch:/watch
# environment:
# - PGID=<gid>
# - PUID=<uid>
# - TZ=<timezone>
# ports:
# - 9091:9091
# - 51413:51413
# labels:
# - "traefik.enable=true"
# - "traefik.admin.frontend.rule=Host:torrent.{{ domain }}"
# - "traefik.admin.protocol=http"
# - "traefik.admin.port=9091"
transmission:
image: linuxserver/transmission
volumes:
- /var/homelabos/transmission/config:/config
- /var/homelabos/transmission/downloads:/downloads
- /var/homelabos/transmission/watch:/watch
environment:
- PGID=<gid>
- PUID=<uid>
- TZ=<timezone>
ports:
- 9091:9091
- 51413:51413
labels:
- "traefik.enable=true"
- "traefik.admin.frontend.rule=Host:torrent.{{ domain }}"
- "traefik.admin.protocol=http"
- "traefik.admin.port=9091"
urbackup:
image: cfstras/urbackup
ports:
- 55413
- 55414
- 55415
- 35622
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/homelabos/urbackup/db/:/var/urbackup
- /mnt/Gangsternas/Backups/urbackup/:/backup
labels:
- "traefik.enable=true"
- "traefik.admin.frontend.rule=Host:backup.{{ domain }}"
- "traefik.admin.protocol=http"
- "traefik.admin.port=55414"
\ No newline at end of file
......@@ -6,11 +6,11 @@ defaultEntryPoints = ["http"]
[entryPoints]
[entryPoints.http]
address = ":80"
# [entryPoints.http.redirect]
# entryPoint = "https"
# [entryPoints.https]
# address = ":443"
# [entryPoints.https.tls]
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[retry]
......@@ -20,10 +20,10 @@ domain = "{{domain}}"
watch = true
exposedByDefault = false
# [acme]
# email = "nickabusey@gmail.com"
# storage = "acme.json"
# entryPoint = "https"
# onHostRule = true
# [acme.httpChallenge]
# entryPoint = "http"
\ No newline at end of file
[acme]
email = "nickabusey@gmail.com"
storage = "acme.json"
entryPoint = "https"
onHostRule = true
[acme.httpChallenge]
entryPoint = "http"
\ No newline at end of file
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="lang:clipboard.copy" content="Copy to clipboard">
<meta name="lang:clipboard.copied" content="Copied to clipboard">
<meta name="lang:search.language" content="en">
<meta name="lang:search.pipeline.stopwords" content="True">
<meta name="lang:search.pipeline.trimmer" content="True">
<meta name="lang:search.result.none" content="No matching documents">
<meta name="lang:search.result.one" content="1 matching document">
<meta name="lang:search.result.other" content="# matching documents">
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="/assets/images/favicon.png">
<meta name="generator" content="mkdocs-0.17.3, mkdocs-material-2.7.2">
<title>HomelabOS</title>
<link rel="stylesheet" href="/assets/stylesheets/application.8d40d89b.css">
<script src="/assets/javascripts/modernizr.1aa3b519.js"></script>
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono">
<style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
</head>
<body dir="ltr">
<svg class="md-svg">
<defs>
</defs>
</svg>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="search" autocomplete="off">
<label class="md-overlay" data-md-component="overlay" for="drawer"></label>
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="/" title="HomelabOS" class="md-header-nav__button md-logo">
<i class="md-icon"></i>
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
<span class="md-header-nav__topic">
HomelabOS
</span>
<span class="md-header-nav__topic">
</span>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--search md-header-nav__button" for="search"></label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="search"></label>
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
&#xE5CD;
</button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result">
<div class="md-search-result__meta">
Type to start searching
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</nav>
</header>
<div class="md-container">
<main class="md-main">
<div class="md-main__inner md-grid" data-md-component="container">
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title md-nav__title--site" for="drawer">
<span class="md-nav__button md-logo">
<i class="md-icon"></i>
</span>
HomelabOS
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="/" title="Home" class="md-nav__link">
Home
</a>
</li>
<li class="md-nav__item">
<a href="/setup/" title="Setup" class="md-nav__link">
Setup
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content">
<article class="md-content__inner md-typeset">
<h1>404 - Not found</h1>
</article>
</div>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
powered by
<a href="http://www.mkdocs.org">MkDocs</a>
and
<a href="https://squidfunk.github.io/mkdocs-material/">
Material for MkDocs</a>
</div>
</div>
</div>
</footer>
</div>
<script src="/assets/javascripts/application.b438e6c5.js"></script>
<script>app.initialize({version:"0.17.3",url:{base:""}})</script>
</body>
</html>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="352" height="448"
viewBox="0 0 352 448" id="bitbucket">
<path fill="currentColor" d="M203.75 214.75q2 15.75-12.625 25.25t-27.875
1.5q-9.75-4.25-13.375-14.5t-0.125-20.5 13-14.5q9-4.5 18.125-3t16 8.875
6.875 16.875zM231.5 209.5q-3.5-26.75-28.25-41t-49.25-3.25q-15.75
7-25.125 22.125t-8.625 32.375q1 22.75 19.375 38.75t41.375 14q22.75-2
38-21t12.5-42zM291.25
74q-5-6.75-14-11.125t-14.5-5.5-17.75-3.125q-72.75-11.75-141.5 0.5-10.75
1.75-16.5 3t-13.75 5.5-12.5 10.75q7.5 7 19 11.375t18.375 5.5 21.875
2.875q57 7.25 112 0.25 15.75-2 22.375-3t18.125-5.375 18.75-11.625zM305.5
332.75q-2 6.5-3.875 19.125t-3.5 21-7.125 17.5-14.5 14.125q-21.5
12-47.375 17.875t-50.5 5.5-50.375-4.625q-11.5-2-20.375-4.5t-19.125-6.75-18.25-10.875-13-15.375q-6.25-24-14.25-73l1.5-4
4.5-2.25q55.75 37 126.625 37t126.875-37q5.25 1.5 6 5.75t-1.25 11.25-2
9.25zM350.75 92.5q-6.5 41.75-27.75 163.75-1.25 7.5-6.75 14t-10.875
10-13.625 7.75q-63 31.5-152.5
22-62-6.75-98.5-34.75-3.75-3-6.375-6.625t-4.25-8.75-2.25-8.5-1.5-9.875-1.375-8.75q-2.25-12.5-6.625-37.5t-7-40.375-5.875-36.875-5.5-39.5q0.75-6.5
4.375-12.125t7.875-9.375 11.25-7.5 11.5-5.625 12-4.625q31.25-11.5
78.25-16 94.75-9.25 169 12.5 38.75 11.5 53.75 30.5 4 5 4.125
12.75t-1.375 13.5z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448"
viewBox="0 0 416 448" id="github">
<path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19-18.125
8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19 18.125-8.5
18.125 8.5 10.75 19 3.125 20.5zM320 304q0 10-3.125 20.5t-10.75
19-18.125 8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19