You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

139 lines
3.2 KiB
Markdown

4 years ago
# Homer in docker
###### guide by example
4 years ago
![logo](https://i.imgur.com/NSZ1DTH.png)
# Purpose
4 years ago
Homepage.
* [Github](https://github.com/bastienwirtz/homer)
4 years ago
* [DockerHub image used](https://hub.docker.com/r/b4bz/homer)
# Files and directory structure
```
4 years ago
/home/
└── ~/
└── docker/
└── homer/
├── assets/
├── .env
├── docker-compose.yml
└── config.yml
4 years ago
```
# docker-compose
`docker-compose.yml`
4 years ago
```yml
4 years ago
version: "2"
services:
homer:
image: b4bz/homer:latest
container_name: homer
hostname: homer
restart: unless-stopped
volumes:
- ./config.yml:/www/config.yml
- ./assets/:/www/assets
networks:
default:
external:
name: $DEFAULT_NETWORK
```
`.env`
4 years ago
```bash
4 years ago
# GENERAL
MY_DOMAIN=blabla.org
DEFAULT_NETWORK=caddy_net
4 years ago
TZ=Europe/Bratislava
4 years ago
```
# Reverse proxy
4 years ago
Caddy v2 is used, details
[here](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/caddy_v2).</br>
4 years ago
`Caddyfile`
```
{$MY_DOMAIN} {
reverse_proxy homer:8080
}
```
# Config
4 years ago
Homepage is configured in `config.yml` file.
4 years ago
`config.yml`
```yml
title: "Homepage"
subtitle: "Homer"
4 years ago
logo: "assets/logo.png"
4 years ago
# icon: "fas fa-skull-crossbones"
4 years ago
footer: '<p>less boring look with a footer</p>'
4 years ago
# Optional navbar
links:
4 years ago
- name: "Font Awesome Icons Galery"
4 years ago
icon: "fab fa-fort-awesome"
url: "https://fontawesome.com/icons?d=gallery"
- name: "Reddit SelfHosted"
icon: "fab fa-reddit"
url: "https://www.reddit.com/r/selfhosted/"
4 years ago
# First level array represent a group
4 years ago
# Single service with an empty name if not using groups
services:
4 years ago
- name: "Main"
4 years ago
icon: "fab fa-docker"
items:
- name: "Bookstack"
logo: "/assets/tools/bookstack.png"
subtitle: "Notes and Documentation"
url: "https://book.blabla.org"
- name: "Bitwarden"
logo: "/assets/tools/bitwarden.png"
subtitle: "Password Manager"
url: "https://passwd.blabla.org"
- name: "Nextcloud"
logo: "/assets/tools/nextcloud.png"
subtitle: "File Sync & Share"
url: "https://nextcloud.blabla.org"
- name: "Monitoring"
icon: "fas fa-heartbeat"
items:
- name: "Prometheus + Grafana"
logo: "/assets/tools/grafana.png"
subtitle: "Metric analytics & dashboards"
url: "https://grafana.blabla.org"
- name: "Portainer"
logo: "/assets/tools/portainer.png"
subtitle: "Docker Manager"
url: "https://portainer.blabla.org"
```
4 years ago
![look](https://i.imgur.com/hrggtcZ.png)
4 years ago
# Update
* [watchtower](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/watchtower) updates the image automaticly
* manual image update</br>
4 years ago
`docker-compose pull`</br>
`docker-compose up -d`</br>
`docker image prune`
4 years ago
# Backup and restore
4 years ago
4 years ago
* **backup** using [BorgBackup setup](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/borg_backup)
4 years ago
that makes daily snapshot of the entire directory
* **restore**</br>
copy config.yml and assets directory from a borg repository to a freshly spin container