73 lines
2.2 KiB
YAML
73 lines
2.2 KiB
YAML
|
{{ ansible_managed | comment }}
|
||
|
|
||
|
# Infrastructure
|
||
|
# Ansible instructions to deploy the infrastructure
|
||
|
# Copyright (C) 2020 Saibotk
|
||
|
#
|
||
|
# This program is free software: you can redistribute it and/or modify
|
||
|
# it under the terms of the GNU General Public License as published by
|
||
|
# the Free Software Foundation, version 3 of the License.
|
||
|
#
|
||
|
# This program is distributed in the hope that it will be useful,
|
||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
# GNU General Public License for more details.
|
||
|
#
|
||
|
# You should have received a copy of the GNU General Public License
|
||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
|
||
|
version: '2.1'
|
||
|
|
||
|
services:
|
||
|
owncast:
|
||
|
image: {{ owncast_image }}:{{ owncast_image_version }}
|
||
|
mem_limit: 1gb
|
||
|
memswap_limit: 1280mb
|
||
|
security_opt:
|
||
|
- no-new-privileges
|
||
|
labels:
|
||
|
- "traefik.enable=true"
|
||
|
|
||
|
- "traefik.http.routers.owncast.rule=Host(`{{ owncast_domain }}`) && PathPrefix(`/`)"
|
||
|
- "traefik.http.routers.owncast.entrypoints=websecure"
|
||
|
- "traefik.http.routers.owncast.tls.certresolver={{ owncast_certresolver }}"
|
||
|
- "traefik.http.routers.owncast.middlewares=owncast,compress"
|
||
|
- "traefik.http.routers.owncast.service=owncast"
|
||
|
- "traefik.http.services.owncast.loadbalancer.server.port=8080"
|
||
|
- "traefik.http.middlewares.owncast.headers.sslredirect=true"
|
||
|
- "traefik.http.middlewares.owncast.headers.stsSeconds=63072000"
|
||
|
- "traefik.http.middlewares.owncast.headers.referrerPolicy=no-referrer"
|
||
|
|
||
|
{% if proxy_network is defined %}
|
||
|
- "traefik.docker.network={{ proxy_network }}"
|
||
|
{% endif %}
|
||
|
|
||
|
volumes:
|
||
|
- "{{ owncast_config_location }}/config.yaml:/app/config.yaml:ro"
|
||
|
|
||
|
ports:
|
||
|
- "{{ owncast_stream_port }}:1935"
|
||
|
|
||
|
networks:
|
||
|
owncast-backend:
|
||
|
{% if proxy_network is defined %}
|
||
|
{{ proxy_network }}:
|
||
|
{% endif %}
|
||
|
|
||
|
restart: always
|
||
|
|
||
|
networks:
|
||
|
owncast-backend:
|
||
|
driver: bridge
|
||
|
{% if owncast_ipv6 is defined and owncast_ipv6.enabled %}
|
||
|
ipam:
|
||
|
driver: default
|
||
|
config:
|
||
|
- subnet: {{ owncast_ipv6.subnet }}
|
||
|
enable_ipv6: true
|
||
|
{% endif %}
|
||
|
{% if proxy_network is defined %}
|
||
|
{{ proxy_network }}:
|
||
|
external: true
|
||
|
{% endif %}
|