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 ...@@ -15,11 +15,15 @@ To make it easy for anyone to own all their data in an easy and secure way, with
## Features ## Features
* One command depyloment * One command depyloment
* Automated HTTPS endpoints (Coming Soon)
* Automated Backups (Coming Soon) ## Planned Features
* Easy Restore (Coming Soon)
* Dynamic DNS Support (Coming Soon) * Automated HTTPS endpoints
* Automated Apple Health Import (Coming Soon) * Automated Backups
* Easy Restore
* Dynamic DNS Support
* Automated Apple Health Import
* Automated LDAP Sync
## Demo ## Demo
...@@ -33,23 +37,25 @@ To make it easy for anyone to own all their data in an easy and secure way, with ...@@ -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) * [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/) * Documentation - Offline, searchable documentation via [MkDocs](https://www.mkdocs.org/)
* [Emby](https://emby.media/) - Media player * [Emby](https://emby.media/) - Media player
* [Firefly III](https://firefly-iii.org/) - Money management budgeting app
* [Gitea](https://gitea.io/en-US/) - Git hosting * [Gitea](https://gitea.io/en-US/) - Git hosting
* [Grafana](https://grafana.com/) - Pretty graphs * [Grafana](https://grafana.com/) - Pretty graphs
* [Home Assistant](https://www.home-assistant.io/) - Home Aatomation * [Home Assistant](https://www.home-assistant.io/) - Home Aatomation
* [InfluxDB](https://www.influxdata.com/time-series-platform/influxdb/) - Time series data storage * [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 * [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 * [Sonerezh](https://www.sonerezh.bzh/) - Music streaming and library management
* [Telegraf](https://www.influxdata.com/time-series-platform/telegraf/) - Server statistics reporting * [Telegraf](https://www.influxdata.com/time-series-platform/telegraf/) - Server statistics reporting
* [Terminal](georgeyord/butterfly-web-terminal) - Web based terminal access * [Terminal](georgeyord/butterfly-web-terminal) - Web based terminal access
* [Transmission](https://transmissionbt.com/) - BitTorrent client
### Coming Soon ### Coming Soon
* BitWarden - Password manager * BitWarden - Password manager
* BulletNotes - Note taking knowledgebase with kanban and calendar functionality. * BulletNotes - Note taking knowledgebase with kanban and calendar functionality.
* OwnTracksRecorder - https://github.com/owntracks/recorder * 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 ## Requirements
...@@ -63,7 +69,9 @@ Ansible version 2.5+ installed on your computer (not the server). ...@@ -63,7 +69,9 @@ Ansible version 2.5+ installed on your computer (not the server).
## Installation ## 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 ## Contributing
...@@ -73,4 +81,6 @@ Please do! ...@@ -73,4 +81,6 @@ Please do!
Follow the [MkDocs Material Theme setup directions](https://squidfunk.github.io/mkdocs-material/getting-started/). Follow the [MkDocs Material Theme setup directions](https://squidfunk.github.io/mkdocs-material/getting-started/).
Then run `mkdocs serve` Then run `mkdocs serve`.
\ No newline at end of file
To build changes to the docs run `make build`.
...@@ -16,4 +16,8 @@ HomelabOS is a collection of various separate services. You can find links to th ...@@ -16,4 +16,8 @@ HomelabOS is a collection of various separate services. You can find links to th
### [Home Assistant](http://homeassistant.{{ domain }}/) ### [Home Assistant](http://homeassistant.{{ domain }}/)
[Home Assistant Documentation](https://www.home-assistant.io/docs/) [Home Assistant Documentation](https://www.home-assistant.io/docs/)
\ No newline at end of file
### [Transmission](http://torrent.{{ domain }}/)
Login with your default username and password `transmission`
\ No newline at end of file
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
- hosts: all - hosts: all
become: True become: True
gather_facts: True gather_facts: True
tags: docker tags: common
roles: roles:
- docker - common
- hosts: all - hosts: all
become: True become: True
...@@ -16,4 +16,4 @@ ...@@ -16,4 +16,4 @@
roles: roles:
- homelabos - homelabos
# - transmission - transmission
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
path: "/var/homelabos/{{ item }}" path: "/var/homelabos/{{ item }}"
state: directory state: directory
loop: loop:
- chronograf
- docker - docker
- docs - docs
- docs/docs - docs/docs
...@@ -19,6 +20,7 @@ ...@@ -19,6 +20,7 @@
- pihole - pihole
- pihole/config - pihole/config
- pihole/dnsmasq.d - pihole/dnsmasq.d
- portainer
- sonerezh/thumbnails - sonerezh/thumbnails
- sonerezh_db - sonerezh_db
- telegraf - telegraf
...@@ -28,6 +30,9 @@ ...@@ -28,6 +30,9 @@
- transmission/downloads - transmission/downloads
- transmission/watch - transmission/watch
- name: Configure docs
copy: src=site dest=/var/homelabos/docs
- name: Configure Telegraf. - name: Configure Telegraf.
template: src=telegraf.conf dest=/var/homelabos/telegraf/telegraf.conf template: src=telegraf.conf dest=/var/homelabos/telegraf/telegraf.conf
...@@ -53,7 +58,7 @@ ...@@ -53,7 +58,7 @@
src: docker-compose.yml src: docker-compose.yml
dest: /var/homelabos/docker/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 command: docker-compose -f /var/homelabos/docker/docker-compose.yml pull
- name: Restart HomelabOS service. - name: Restart HomelabOS service.
...@@ -64,4 +69,7 @@ ...@@ -64,4 +69,7 @@
state: restarted state: restarted
- debug: - debug:
msg: "HomelabOS Installed successfully! Go to http://docs.{{ domain }}/ to get started." msg: "HomelabOS Installed successfully! Go to https://{{ domain }}/ to get started."
\ No newline at end of file
- 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' ...@@ -2,24 +2,32 @@ version: '3'
services: services:
chronograf: # Commented out until we can lock it down.
image: chronograf # There is no auth, you can do too much through the interface.
restart: always # chronograf:
links: # image: chronograf
- influxdb # restart: always
ports: # links:
- 8888:8888 # - influxdb
environment: # ports:
- influxdb-url=http://influxdb:8086 # - 8888:8888
labels: # volumes:
- "traefik.enable=true" # - /var/homelabos/chronograf/:/var/lib/chronograf
- "traefik.admin.frontend.rule=Host:chronograf.{{ domain }}" # entrypoint: 'chronograf --influxdb-url=http://influxdb:8086'
- "traefik.admin.protocol=http" # environment:
- "traefik.admin.port=8888" # - 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: convos:
image: nordaaker/convos image: nordaaker/convos
restart: always restart: always
volumes:
- /var/homelabos/convos:/var/convos
ports: ports:
- 8033:3000 - 8033:3000
labels: labels:
...@@ -43,22 +51,21 @@ services: ...@@ -43,22 +51,21 @@ services:
- DARKSKY_LONGITUDE={{ longitude }} - DARKSKY_LONGITUDE={{ longitude }}
docs: docs:
image: squidfunk/mkdocs-material image: kyma/docker-nginx
volumes: volumes:
- /var/homelabos/docs:/docs - /var/homelabos/docs/site:/var/www
ports:
- 8000:8000
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.admin.frontend.rule=Host:docs.{{ domain }}" - "traefik.admin.frontend.rule=Host:docs.{{ domain }}"
- "traefik.admin.protocol=http" - "traefik.admin.protocol=http"
- "traefik.admin.port=8000" - "traefik.admin.port=80"
emby: emby:
image: emby/embyserver:latest image: emby/embyserver:latest
restart: always restart: always
volumes: volumes:
- /var/homelabos/emby:/config - /var/homelabos/emby:/config
- /mnt/Gangsternas:/mnt/Gangsternas
ports: ports:
- 8096:8096 - 8096:8096
labels: labels:
...@@ -67,6 +74,39 @@ services: ...@@ -67,6 +74,39 @@ services:
- "traefik.admin.protocol=http" - "traefik.admin.protocol=http"
- "traefik.admin.port=8096" - "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: freshrss:
image: linuxserver/freshrss image: linuxserver/freshrss
ports: ports:
...@@ -202,41 +242,91 @@ services: ...@@ -202,41 +242,91 @@ services:
- "traefik.admin.protocol=http" - "traefik.admin.protocol=http"
- "traefik.admin.port=80" - "traefik.admin.port=80"
# paperless: paperless:
# image: danielquinn/paperless image: danielquinn/paperless
# restart: always restart: always
# ports: ports:
# - 8085:8000 - "8325:8000"
# labels: healthcheck:
# - "traefik.enable=true" test: ["CMD", "curl" , "-f", "http://localhost:8000"]
# - "traefik.admin.frontend.rule=Host:paperless.{{ domain }}" interval: 30s
# - "traefik.admin.protocol=http" timeout: 10s
# - "traefik.admin.port=8000" 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: # pihole:
# image: diginc/pi-hole:latest # image: diginc/pi-hole:latest
# restart: always # restart: always
# # volumes: # volumes:
# # - /var/homelabos/pihole/config:/etc/pihole/ # - /var/homelabos/pihole/config/:/etc/pihole/
# # - /var/homelabos/pihole/dnsmasq.d:/etc/dnsmasq.d/" # - /var/homelabos/pihole/dnsmasq.d/:/etc/dnsmasq.d/"
# environment: # environment:
# - WEBPASSWORD={{ default_password }} # - WEBPASSWORD={{ default_password }}
# - VIRTUAL_HOST=pihole.{{ domain }} # - VIRTUAL_HOST=pihole.{{ domain }}
# - ServerIP="${IP}"
# - ServerIPv6="${IPv6}"
# ports:
# - 53:53/tcp
# - 53:53/udp
# labels: # labels:
# - "traefik.enable=true" # - "traefik.enable=true"
# - "traefik.admin.frontend.rule=Host:pihole.{{ domain }}" # - "traefik.admin.frontend.rule=Host:pihole.{{ domain }}"
# - "traefik.admin.protocol=http" # - "traefik.admin.protocol=http"
# - "traefik.admin.port=80" # - "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: sonerezh:
image: sonerezh/sonerezh:latest image: sonerezh/sonerezh:latest
links: links:
- sonerezh_db - sonerezh_db:mysql
volumes: volumes:
- /var/homelabos/music:/music - /mnt/music:/music
- /var/homelabos/sonerezh/thumbnails:/thmubnails - /var/homelabos/sonerezh/thumbnails:/thmubnails
ports: ports:
- 8089:80 - 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: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.admin.frontend.rule=Host:music.{{ domain }}" - "traefik.admin.frontend.rule=Host:music.{{ domain }}"
...@@ -287,22 +377,49 @@ services: ...@@ -287,22 +377,49 @@ services:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- /var/homelabos/traefik/traefik.toml:/etc/traefik/traefik.toml - /var/homelabos/traefik/traefik.toml:/etc/traefik/traefik.toml
- /var/homelabos/traefik/acme.json:/etc/traefik/acme.json - /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: transmission:
# image: linuxserver/transmission image: linuxserver/transmission
# volumes: volumes:
# - /var/homelabos/transmission/config:/config - /var/homelabos/transmission/config:/config
# - /var/homelabos/transmission/downloads:/downloads - /var/homelabos/transmission/downloads:/downloads
# - /var/homelabos/transmission/watch:/watch - /var/homelabos/transmission/watch:/watch
# environment: environment:
# - PGID=<gid> - PGID=<gid>
# - PUID=<uid> - PUID=<uid>
# - TZ=<timezone> - TZ=<timezone>
# ports: ports:
# - 9091:9091 - 9091:9091
# - 51413:51413 - 51413:51413
# labels: labels:
# - "traefik.enable=true" - "traefik.enable=true"
# - "traefik.admin.frontend.rule=Host:torrent.{{ domain }}" - "traefik.admin.frontend.rule=Host:torrent.{{ domain }}"
# - "traefik.admin.protocol=http" - "traefik.admin.protocol=http"
# - "traefik.admin.port=9091" - "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"] ...@@ -6,11 +6,11 @@ defaultEntryPoints = ["http"]
[entryPoints] [entryPoints]
[entryPoints.http] [entryPoints.http]
address = ":80" address = ":80"
# [entryPoints.http.redirect] [entryPoints.http.redirect]
# entryPoint = "https" entryPoint = "https"
# [entryPoints.https] [entryPoints.https]
# address = ":443" address = ":443"
# [entryPoints.https.tls] [entryPoints.https.tls]
[retry] [retry]
...@@ -20,10 +20,10 @@ domain = "{{domain}}" ...@@ -20,10 +20,10 @@ domain = "{{domain}}"
watch = true watch = true
exposedByDefault = false exposedByDefault = false
# [acme] [acme]
# email = "nickabusey@gmail.com" email = "nickabusey@gmail.com"
# storage = "acme.json" storage = "acme.json"
# entryPoint = "https" entryPoint = "https"
# onHostRule = true onHostRule = true
# [acme.httpChallenge] [acme.httpChallenge]
# entryPoint = "http" entryPoint = "http"
\ No newline at end of file \ No newline at end of file
...@@ -4,4 +4,4 @@ theme: ...@@ -4,4 +4,4 @@ theme:
name: 'material' name: 'material'
pages: pages:
- Home: index.md - Home: index.md
\ 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>