From 902da05b4ca9a913fb832bb4b999988ab982bda4 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 11 Aug 2023 17:38:42 +0100 Subject: [PATCH] Add homebox --- Vagrantfile | 2 +- db/init/01-databases.sql | 1 - docker-compose.yml | 20 ++++++++++++++++++++ nginx/nginx.conf.template | 20 ++++++++++++++++++++ 4 files changed, 41 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 21fb054..04161f2 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -33,7 +33,7 @@ Vagrant.configure("2") do |config| # Create a private network, which allows host-only access to the machine # using a specific IP. - config.vm.network "private_network", ip: "192.168.10.10" + config.vm.network "private_network", ip: "192.168.56.10" # Create a public network, which generally matched to bridged network. # Bridged networks make the machine appear as another physical device on diff --git a/db/init/01-databases.sql b/db/init/01-databases.sql index a0ef6f6..1a27ce3 100644 --- a/db/init/01-databases.sql +++ b/db/init/01-databases.sql @@ -1,4 +1,3 @@ -CREATE DATABASE IF NOT EXISTS `monica`; CREATE DATABASE IF NOT EXISTS `gitea`; CREATE DATABASE IF NOT EXISTS `tt-rss`; # Nextcloud will automatically create a database on setup diff --git a/docker-compose.yml b/docker-compose.yml index f88e8ea..85cb849 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -98,6 +98,24 @@ services: - "tower.${DOMAIN}:${LOCAL_IP}" - "office.${DOMAIN}:${LOCAL_IP}" + homebox: + <<: *logging + image: ghcr.io/hay-kot/homebox:latest + restart: unless-stopped + environment: + - HBOX_LOG_LEVEL=info + - HBOX_LOG_FORMAT=text + - HBOX_WEB_MAX_UPLOAD_SIZE=10 + - HBOX_OPTIONS_ALLOW_REGISTRATION=false + - HBOX_MAILER_HOST=${MAIL_HOST} + - HBOX_MAILER_PORT=${MAIL_PORT} + - HBOX_MAILER_USERNAME=${MAIL_USER} + - HBOX_MAILER_PASSWORD=${MAIL_PASSWORD} + volumes: + - homebox:/data/ + networks: + - nginx + gitea: <<: *logging image: gitea/gitea:1 @@ -573,6 +591,7 @@ services: - pihole - foundry - tt-rss + - homebox ports: - 443:443 networks: @@ -607,6 +626,7 @@ volumes: gitea: nextcloud: foundry: + homebox: networks: db: diff --git a/nginx/nginx.conf.template b/nginx/nginx.conf.template index b3ba8b8..3c2cfad 100644 --- a/nginx/nginx.conf.template +++ b/nginx/nginx.conf.template @@ -282,6 +282,26 @@ http { } } + upstream homebox-handler { + server homebox:7745; + } + + server { + listen 443 ssl http2; + + ssl_certificate /etc/nginx/certs/${DOMAIN}.crt; + ssl_certificate_key /etc/nginx/certs/${DOMAIN}.key; + + gzip_types text/plain text/css application/json application/x-javascript + text/xml application/xml application/xml+rss text/javascript; + + server_name assets.${DOMAIN}; + + location / { + proxy_pass http://homebox-handler; + } + } + upstream tt-rss-handler { server tt-rss:9000; }