63 lines
1.9 KiB
Django/Jinja
63 lines
1.9 KiB
Django/Jinja
# unifi-network-app docker compose
|
|
---
|
|
services:
|
|
{% if unifi_mongo_local %}
|
|
unifi-db:
|
|
container_name: unifi-db
|
|
image: "{{ unifi_image_mongodb }}"
|
|
env_file:
|
|
- "{{ unifi_config_path | expanduser }}/env.mongodb.conf"
|
|
ports:
|
|
- target: 27017
|
|
published: "27017"
|
|
protocol: tcp
|
|
restart: unless-stopped
|
|
volumes:
|
|
- "{{ unifi_config_path | expanduser }}/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js"
|
|
- type: bind
|
|
source: "{{ unifi_mongodb_path }}"
|
|
target: /data/db
|
|
networks:
|
|
- unifi-bridge
|
|
{% endif %}
|
|
{% if unifi_server_enabled %}
|
|
unifi-controller:
|
|
image: "{{ unifi_image_unifi }}"
|
|
container_name: "{{ unifi_container_name_unifi }}"
|
|
restart: unless-stopped
|
|
env_file:
|
|
- "{{ unifi_config_path | expanduser }}/env.unifi-controller.conf"
|
|
ports:
|
|
- "{{ unifi_http_port_8443 }}:8443"
|
|
- "{{ unifi_http_port_3478 }}:3478/udp"
|
|
- "{{ unifi_http_port_10001 }}:10001/udp"
|
|
- "{{ unifi_http_port_8080 }}:8080"
|
|
{% if unifi_http_port_1900 is defined and unifi_http_port_1900 -%}
|
|
- "{{ unifi_http_port_1900 }}:1900/udp"
|
|
{% endif -%}
|
|
{% if unifi_http_port_8843 is defined and unifi_http_port_8843 -%}
|
|
- "{{ unifi_http_port_8843 }}:8843"
|
|
{% endif -%}
|
|
{% if unifi_http_port_8880 is defined and unifi_http_port_8880 -%}
|
|
- "{{ unifi_http_port_8880 }}:8880"
|
|
{% endif -%}
|
|
{% if unifi_http_port_6789 is defined and unifi_http_port_6789 -%}
|
|
- "{{ unifi_http_port_6789 }}:6789"
|
|
{% endif -%}
|
|
{% if unifi_http_port_5514 is defined and unifi_http_port_5514 -%}
|
|
- "{{ unifi_http_port_5514 }}:5514/udp"
|
|
{% endif %}
|
|
|
|
networks:
|
|
- unifi-bridge
|
|
volumes:
|
|
- type: bind
|
|
source: "{{ unifi_network_application_path }}"
|
|
target: /config
|
|
{% endif %}
|
|
|
|
networks:
|
|
unifi-bridge:
|
|
driver: bridge
|
|
|