saibotk
100ef46288
This patch removes the priority on the default HTTP->HTTPS redirect rule defined on the traefik container, as all traffic should always be redirected to HTTPS. So, to fix the teamspeak redirect, the endpoint for the redirect was also correctly set.
60 lines
2.1 KiB
YAML
60 lines
2.1 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:
|
|
teamspeak:
|
|
image: {{ teamspeak_baseimage }}:{{ teamspeak_image_version }}
|
|
mem_limit: 100mb
|
|
memswap_limit: 128mb
|
|
security_opt:
|
|
- no-new-privileges
|
|
{% if teamspeak_selinux_level != omit %}
|
|
- label=level:{{ teamspeak_selinux_level }}
|
|
{% endif %}
|
|
restart: always
|
|
ports:
|
|
- "0.0.0.0:{{ teamspeak_voice_port }}:9987/udp"
|
|
- "0.0.0.0:{{ teamspeak_file_port }}:10011"
|
|
- "0.0.0.0:{{ teamspeak_other_port }}:30033"
|
|
volumes:
|
|
- "{{ teamspeak_data_location }}:/var/ts3server/"
|
|
environment:
|
|
TS3SERVER_LICENSE: accept
|
|
labels:
|
|
{% if teamspeak_traefik_redirect_enabled %}
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.teamspeak.rule=Host(`{{ teamspeak_traefik_domain }}`)"
|
|
- "traefik.http.routers.teamspeak.entrypoints=websecure"
|
|
- "traefik.http.routers.teamspeak.middlewares=ts3server-redirect"
|
|
- "traefik.http.routers.teamspeak.tls.certresolver={{ teamspeak_traefik_certresolver }}"
|
|
- "traefik.http.middlewares.ts3server-redirect.redirectscheme.scheme=ts3server"
|
|
{% endif %}
|
|
networks:
|
|
teamspeak_network:
|
|
|
|
networks:
|
|
teamspeak_network:
|
|
driver: bridge
|
|
{% if teamspeak_ipv6 is defined and teamspeak_ipv6.enabled %}
|
|
ipam:
|
|
driver: default
|
|
config:
|
|
- subnet: {{ teamspeak_ipv6.subnet }}
|
|
enable_ipv6: true
|
|
{% endif %}
|