Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

154 Commits

Folders and files

Repository files navigation

selfhosted-compose

A collection of Docker Compose files for managing self-hosted services. Each service is organized into its own directory with a dedicated Composefile, and a top-level Composefile ties them all together using the Compose include directive.

Services

Service Description
gitd Self-hosted Git forge (Forgejo) for repository management
grafana Monitoring and visualization platform for metrics and dashboards
haproxy Reverse proxy and load balancer for routing HTTP/HTTPS traffic
hass Home automation system with an MQTT broker (Mosquitto)
hoarder Bookmark and web hoarding service with full-text search (MeiliSearch)
jellyfin Media server for streaming movies, TV shows, and music
jenkins CI/CD server with build agent support
ollama Local LLM inference engine with GPU acceleration
tavern Interactive chat interface for conversational AI

Prerequisites

  • Install docker or podman.
  • Install docker-compose.

Getting Started

  1. Clone the repository:

    git clone https://github.com/junland/selfhosted-compose.git
    cd selfhosted-compose
  2. Configure environment variables:

    Copy the default environment file and edit it with your own values:

    cp default.env .env

    See default.env for available configuration keys. All variables are prefixed with SELFHOSTED_ and are organized by service.

  3. Start all services:

    docker compose -f Composefile up -d

    To start a single service, use its Composefile directly:

    docker compose -f ollama/Composefile up -d

Directory Structure

.
├── Composefile          # Top-level Compose include file
├── default.env          # Default environment variable definitions
├── gitd/                # Forgejo Git forge
├── grafana/             # Grafana dashboards
├── haproxy/             # HAProxy reverse proxy (includes Containerfile and config)
├── hass/                # Home Assistant with Mosquitto MQTT broker
├── hoarder/             # Karakeep bookmarking service
├── jellyfin/            # Jellyfin media server (includes Containerfile)
├── jenkins/             # Jenkins CI/CD with agent images
├── ollama/              # Ollama LLM inference engine
└── tavern/              # SillyTavern chat interface

Example Systemd Service File

Below is a example of a systemd file if you want to put this as a service:

[Unit]
Description=Selfhosted Applications
Requires=docker.service
After=docker.service

[Service]
Type=simple
RemainAfterExit=true
WorkingDirectory=/etc/selfhosted-ng
ExecStartPre=/usr/bin/mkdir -p /var/run/haproxy
ExecStartPre=/usr/bin/docker compose -p selfhosted -f Composefile --env-file ./default_override.env build
ExecStart=/usr/bin/docker compose -p selfhosted -f Composefile --env-file ./default_override.env up --remove-orphans -d
ExecStopPost=/usr/bin/docker stop --filter 'name=-service$'
ExecStop=/usr/bin/ldocker compose -p selfhosted -f Composefile --env-file ./default_override.env down -t 120

[Install]
WantedBy=multi-user.target

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages