chore: base config and deployment for role homarr
This commit is contained in:
parent
029b1a86d4
commit
d3bdb1fdec
3 changed files with 69 additions and 2 deletions
31
roles/homarr/templates/docker-compose.yml.j2
Normal file
31
roles/homarr/templates/docker-compose.yml.j2
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue