32 lines
1.0 KiB
Django/Jinja
32 lines
1.0 KiB
Django/Jinja
version: "3.3"
|
|
|
|
services:
|
|
{% for site in static_sites %}
|
|
{{ site.domain }}:
|
|
image: {{ sws_container_image }}
|
|
container_name: "{{ site.domain }}"
|
|
environment:
|
|
# Note: those envs are customizable but also optional
|
|
- SERVER_PORT=8080
|
|
- SERVER_ROOT=/public
|
|
- SERVER_LOG_LEVEL=info
|
|
volumes:
|
|
- {{ static_site_server_base_path }}/{{ site.user }}/public:/public
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.docker.network=traefik"
|
|
- "traefik.http.routers.{{ site.user }}.rule=Host(`{{ site.host }}`)"
|
|
- "traefik.http.routers.{{ site.user }}.service=present"
|
|
- "traefik.http.routers.{{ site.user }}.entrypoints=web-secure"
|
|
- "traefik.http.routers.{{ site.user }}.tls=true"
|
|
- "traefik.http.routers.{{ site.user }}.tls.certResolver=default"
|
|
- "traefik.http.services.{{ site.user }}.loadbalancer.server.port=8080"
|
|
networks:
|
|
- traefik
|
|
{% endfor %}
|
|
|
|
networks:
|
|
traefik:
|
|
name: "{{ traefik_docker_network }}"
|
|
external: true
|