chore: base config and deployment for role homarr

This commit is contained in:
Tobias Wüst 2026-01-23 15:45:59 +01:00
parent 029b1a86d4
commit d3bdb1fdec
Signed by: Tobias-Wuest
GPG key ID: 2D8992B0F4CA97E8
3 changed files with 69 additions and 2 deletions

View file

@ -0,0 +1,31 @@
#---------------------------------------------------------------------#
# Homarr - A simple, yet powerful dashboard for your server. #
#---------------------------------------------------------------------#
services:
homarr:
container_name: {{ homarr_service_name }}
image: {{ homarr_image }}
restart: unless-stopped
volumes:
{% if homarr_use_docker %}
- /var/run/docker.sock:/var/run/docker.sock # Optional, only if you want docker integration
{% endif %}
- {{ homarr_docker_volume_dir }}/homarr/appdata:/appdata
environment:
- SECRET_ENCRYPTION_KEY={{ homarr_secret_encryption_key }}
networks:
- {{ homarr_traefik_network }}
labels:
- traefik.enable=true
- traefik.docker.network={{ homarr_traefik_network }}
- traefik.http.routers.{{ homarr_service_name }}.rule=Host(`{{ homarr_domain }}`)
{% if homarr_use_ssl %}
- traefik.http.routers.{{ homarr_service_name }}.entrypoints=websecure
- traefik.http.routers.{{ homarr_service_name }}.tls=true
{% else %}
- traefik.http.routers.{{ homarr_service_name }}.entrypoints=web
{% endif %}
- traefik.http.services.{{ homarr_service_name }}.loadbalancer.server.port={{ homarr_port }}
networks:
{{ homarr_traefik_network }}:
external: true