commit 291147ae2096798370a9197f850a73d857de0e01 Author: Hattshire Date: Fri Oct 31 12:32:46 2025 -0300 Initial commit. Add updater script and modules. Generated a Readme.md (ai) and manually reviewed. diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..7786e19 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,15 @@ +[submodule "reverse"] + path = reverse + url = https://git.palta.cyou/oh/services-reverse +[submodule "forgejo"] + path = forgejo + url = https://git.palta.cyou/oh/services-forgejo +[submodule "next"] + path = next + url = https://git.palta.cyou/oh/services-next +[submodule "mailserver"] + path = mailserver + url = https://git.palta.cyou/oh/services-mail +[submodule "im"] + path = im + url = https://git.palta.cyou/oh/services-im diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..19cdc2e --- /dev/null +++ b/Readme.md @@ -0,0 +1,177 @@ +# Docker Services Repository + +A comprehensive collection of self-hosted web services managed through Docker Compose submodules, designed for easy deployment and maintenance of a complete personal or organizational infrastructure. + +## Overview + +This repository serves as a centralized management system for multiple containerized services, each maintained as a git submodule with its own Docker Compose configuration. All services can be updated simultaneously using the included automation script. + +## Services + +### 🦊 Forgejo +A lightweight, self-hosted Git service providing repository hosting, issue tracking, and collaboration features. + +**Location:** `./forgejo/` + +**Key Features:** +- Git repository hosting +- Pull requests and code review +- Issue tracking and project management + +### 💬 IM (XMPP Server) +An XMPP messaging server with Slidge gateway integration for WhatsApp connectivity. + +**Location:** `./im/` + +**Key Features:** +- Standards-based XMPP messaging +- WhatsApp bridge via Slidge +- End-to-end encryption support +- Multi-client compatibility + +### 📧 Mail Server +A complete email service solution handling mail sending, receiving, and storage. + +**Location:** `./mailserver/` + +**Key Features:** +- SMTP/IMAP support +- Spam filtering +- Webmail interface +- Email authentication (SPF, DKIM, DMARC) + +### ☁️ Nextcloud +A self-hosted cloud storage and collaboration platform. + +**Location:** `./next/` + +**Key Features:** +- File synchronization and sharing +- Calendar and contacts +- Online document editing +- Mobile and desktop client support + +### 🔀 Reverse Proxy +An Nginx-based reverse proxy managing DNS routing and SSL termination for all services. + +**Location:** `./reverse/` + +**Key Features:** +- Centralized SSL/TLS management +- Domain-based routing +- HTTP to HTTPS redirection + +## Getting Started + +### Prerequisites + +- Docker +- Docker Compose +- Git with submodule support +- Root or sudo access for binding to privileged ports + +### Installation + +1. Clone the repository with submodules: +```bash +git clone --recurse-submodules +cd +``` + +2. If you already cloned without submodules: +```bash +git submodule init +git submodule update +``` + +3. Configure each service by navigating to its directory and editing the respective `docker-compose.yml` and environment files. + +4. Start all services: +```bash +./docker-update-all.sh +``` + +Or start individual services: +```bash +cd +./docker-update.sh +``` + +## Maintenance + +### Updating All Services + +The included update script handles pulling new images and restarting containers: + +```bash +./docker-update-all.sh +``` + +### Updating Individual Services + +Navigate to the service directory and update manually: + +```bash +cd +./docker-update.sh +``` + +### Backing Up Data + +Each service stores persistent data in Docker volumes. There's an included backup script in each: + +```bash +# Stop services before backup +docker compose down + +# Backup volumes +./backup.sh + +# Restart services +docker compose up -d +``` + +### Viewing Logs + +Check service logs for troubleshooting: + +```bash +cd +docker compose logs -f +``` + +## Configuration + +Each service maintains its own configuration within its submodule directory. Refer to the individual service's README or documentation for specific configuration options. + +### Common Configuration Steps + +1. Set up domain names in your DNS provider +2. Configure service-specific environment variables (see each service Readme for reference) + +> [!INFO] +> One shot services could be run with the reverse proxy with `docker run --network=reverse_proxy-tier -e VIRTUAL_HOST=examp.le -e LETSENCRYPT_HOST=examp.le service_name` + +## Network Architecture + +All services communicate through Docker networks. The reverse proxy handles external traffic and routes requests to the appropriate service based on domain names. + +``` +Internet → Reverse Proxy (Nginx) → Individual Services + ↓ + SSL Termination + DNS Routing +``` + +## Security Considerations + +- Keep all services updated regularly using `docker-update-all.sh` +- Use strong passwords and consider implementing 2FA where available +- Regularly backup all data volumes +- Monitor logs for suspicious activity +- Keep the reverse proxy's SSL certificates up to date (they should update automatically, but checking from time to time doesn't hurt) + +## License + +Please refer to individual service submodules for their respective licenses. + diff --git a/docker-update-all.sh b/docker-update-all.sh new file mode 100755 index 0000000..b129d79 --- /dev/null +++ b/docker-update-all.sh @@ -0,0 +1,6 @@ +#!/usr/bin/bash +for script in $(find . -maxdepth 2 -name docker-update.sh); do + pushd $(dirname $script) + ./docker-update.sh + popd +done diff --git a/forgejo b/forgejo new file mode 160000 index 0000000..2c445d5 --- /dev/null +++ b/forgejo @@ -0,0 +1 @@ +Subproject commit 2c445d5f054f78b064f69d7605f3e8db32181269 diff --git a/im b/im new file mode 160000 index 0000000..251fa21 --- /dev/null +++ b/im @@ -0,0 +1 @@ +Subproject commit 251fa2147f3ae3aa0557d3baf475af1cf9e0e995 diff --git a/mailserver b/mailserver new file mode 160000 index 0000000..7043ed4 --- /dev/null +++ b/mailserver @@ -0,0 +1 @@ +Subproject commit 7043ed407e1231f312a905c616a3ee576fd52873 diff --git a/next b/next new file mode 160000 index 0000000..d681518 --- /dev/null +++ b/next @@ -0,0 +1 @@ +Subproject commit d68151811e876c54c34f536b8c633770ed27bb62 diff --git a/reverse b/reverse new file mode 160000 index 0000000..9d46bec --- /dev/null +++ b/reverse @@ -0,0 +1 @@ +Subproject commit 9d46becd13cdea6c79a112953b4eca8bdf5cb484