skylab
/
skylab-ansible
Archived
2
0
Fork 0
This repository has been archived on 2023-05-19. You can view files and clone it, but cannot push or open issues or pull requests.
skylab-ansible/skylab/core/playbooks/templates/docker-compose/unifi.yaml.j2

71 lines
1.5 KiB
Django/Jinja

---
version: "{{ skylab_compose_version }}"
networks:
unifi:
name: unifi
driver: overlay
ipam:
driver: default
config:
- subnet: {{ app.networks.ext }}
volumes:
{% for key, value in app.volumes.items() %}
unifi-{{ key }}:
name: datastore{{ value }}
driver: glusterfs
{% endfor %}
services:
wlc:
image: jacobalberty/unifi:{{ app.versions.wlc }}
hostname: en1-unifi-wlc
init: true
networks:
- unifi
ports:
- published: {{ app.ports.8080 }}
target: 8080
protocol: tcp
mode: ingress
- published: {{ app.ports.8443 }}
target: 8443
protocol: tcp
mode: ingress
- published: {{ app.ports.8843 }}
target: 8843
protocol: tcp
mode: ingress
- published: {{ app.ports.8880 }}
target: 8880
protocol: tcp
mode: ingress
- published: {{ app.ports.3478 }}
target: 3478
protocol: udp
mode: ingress
- published: {{ app.ports.6789 }}
target: 6789
protocol: tcp
mode: ingress
- published: {{ app.ports.10001 }}
target: 10001
protocol: udp
mode: ingress
volumes:
- type: volume
source: unifi-data
target: /unifi
read_only: false
environment:
RUNAS_UID0: "false"
UNIFI_UID: "{{ _app_account.uid }}"
UNIFI_GID: "{{ _app_account.uid }}"
TZ: "Americas/New_York"
deploy:
replicas: 1