This commit is contained in:
Lorenzo Carbonell 2023-02-15 06:37:12 +01:00
parent d3090e3214
commit addd7d25f4
5 changed files with 114 additions and 0 deletions

23
huginn/README.md Normal file
View File

@ -0,0 +1,23 @@
# Installation
```
git clone https://github.com/atareao/self-hosted.git
cd self-hosted/huginn
cp sample.env .env
sed -i "s/huginn.tuservidor.es/el_fqdn_que_quieras/g" .env
```
A la hora de levantar el servicio dependerá del proxy inverso que hayas seleccionado. Si has elegido Caddy, simplemente,
```
docker-compose -f docker-compose.yml -f docker-compose.caddy.yml up -d
docker-compose logs -f
```
Mientras que si has elegido Traefik,
```
docker-compose -f docker-compose.yml -f docker-compose.traefik.yml up -d
docker-compose logs -f
```

View File

@ -0,0 +1,13 @@
version: "3.7"
services:
huginn:
networks:
- proxy
labels:
- caddy="${FQDN}"
- caddy.reverse_proxy="{{upstreams 3000}}"
networks:
proxy:
external: true

View File

@ -0,0 +1,21 @@
version: "3"
services:
huginn:
networks:
- proxy
labels:
- traefik.enable=true
- traefik.http.services.huginn.loadbalancer.server.port=3000
- traefik.http.routers.huginn.entrypoints=web
- traefik.http.routers.huginn.rule=Host(`${FQDN}`)
- traefik.http.middlewares.huginn-https-redirect.redirectscheme.scheme=websecure
- traefik.http.routers.huginn.middlewares=huginn-https-redirect
- traefik.http.routers.huginn-secure.entrypoints=websecure
- traefik.http.routers.huginn-secure.rule=Host(`${FQDN}`)
- traefik.http.routers.huginn-secure.tls=true
- traefik.http.routers.huginn-secure.tls.certresolver=letsencrypt
networks:
proxy:
external: true

52
huginn/docker-compose.yml Normal file
View File

@ -0,0 +1,52 @@
version: "3.7"
services:
mariadb:
image: mariadb
container_name: huginn_mariadb
restart: unless-stopped
init: true
environment:
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
volumes:
- huginn_mariadb:/var/lib/mysql
networks:
- internal
huginn:
image: huginn/huginn-single-process
container_name: huginn
restart: unless-stopped
init: true
environment:
DATABASE_NAME: ${DB_NAME}
DATABASE_USERNAME: ${DB_USER}
DATABASE_PASSWORD: ${DB_PASSWORD}
depends_on:
- mariadb
networks:
- internal
threaded:
image: huginn/huginn-single-process
container_name: threaded
restart: unless-stopped
init: true
environment:
DATABASE_NAME: ${DB_NAME}
DATABASE_USERNAME: ${DB_USER}
DATABASE_PASSWORD: ${DB_PASSWORD}
WORKER_CMD: bin/threaded.rb
depends_on:
- mariadb
networks:
- internal
volumes:
huginn_mariadb: {}
networks:
internal: {}

5
huginn/sample.env Normal file
View File

@ -0,0 +1,5 @@
DB_NAME=huginn
DB_USER=huginn
DB_PASSWORD=huginn
DB_ROOT_PASSWORD=huginn
FQDN=huginn.tuservidor.es