65 lines
2.2 KiB
YAML
65 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'
|
||
|
|
||
|
services:
|
||
|
blockmap-nginx:
|
||
|
image: docker.io/library/nginx:alpine
|
||
|
mem_limit: 32mb
|
||
|
memswap_limit: 64mb
|
||
|
read_only: true
|
||
|
tmpfs:
|
||
|
- /run/:size=32K
|
||
|
- /var/cache/nginx:size=10M
|
||
|
security_opt:
|
||
|
- no-new-privileges
|
||
|
labels:
|
||
|
- "traefik.enable=true"
|
||
|
|
||
|
- "traefik.http.routers.blockmap.rule=Host(`{{ minecraft_blockmap_domain }}`) && PathPrefix(`/`)"
|
||
|
- "traefik.http.routers.blockmap.entrypoints=websecure"
|
||
|
- "traefik.http.routers.blockmap.tls.certresolver={{ minecraft_blockmap_certresolver }}"
|
||
|
- "traefik.http.routers.blockmap.middlewares=blockmap,compress"
|
||
|
- "traefik.http.routers.blockmap.service=blockmap"
|
||
|
- "traefik.http.services.blockmap.loadbalancer.server.port=80"
|
||
|
- "traefik.http.middlewares.blockmap.headers.sslredirect=true"
|
||
|
- "traefik.http.middlewares.blockmap.headers.stsSeconds=63072000"
|
||
|
- "traefik.http.middlewares.blockmap.headers.referrerPolicy=no-referrer"
|
||
|
|
||
|
{% if proxy_network is defined %}
|
||
|
- "traefik.docker.network={{ proxy_network }}"
|
||
|
{% endif %}
|
||
|
|
||
|
volumes:
|
||
|
- "{{ minecraft_blockmap_install_location }}/default.conf:/etc/nginx/conf.d/default.conf:ro"
|
||
|
- "{{ minecraft_blockmap_output_location }}:/usr/share/nginx/html:ro"
|
||
|
|
||
|
networks:
|
||
|
{% if proxy_network is defined %}
|
||
|
{{ proxy_network }}:
|
||
|
{% endif %}
|
||
|
|
||
|
restart: always
|
||
|
|
||
|
networks:
|
||
|
{% if proxy_network is defined %}
|
||
|
{{ proxy_network }}:
|
||
|
external: true
|
||
|
{% endif %}
|