Files
infra/ansible/templates/server/docker-compose.yml.j2
2026-09-12 17:19:20 +02:00

86 lines
2.5 KiB
Django/Jinja

---
{% set selinux_volume_option = server_compose_selinux_mount_option | default('') %}
name: server
services:
nginx-proxy-manager:
image: docker.io/jc21/nginx-proxy-manager:latest
container_name: nginx-proxy-manager
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "127.0.0.1:81:81"
extra_hosts:
- "host.containers.internal:host-gateway"
volumes:
- "/opt/npm/data:/data{{ ':' ~ selinux_volume_option if selinux_volume_option else '' }}"
- "/opt/npm/letsencrypt:/etc/letsencrypt{{ ':' ~ selinux_volume_option if selinux_volume_option else '' }}"
networks:
- web
# Disabled: prometheus does not have enough resources to run Nextcloud AIO.
# nextcloud-aio-mastercontainer:
# image: ghcr.io/nextcloud-releases/all-in-one:latest
# container_name: nextcloud-aio-mastercontainer
# init: true
# restart: always
# ports:
# - "127.0.0.1:8080:8080"
# environment:
# APACHE_PORT: "11000"
# APACHE_IP_BINDING: "0.0.0.0"
# APACHE_ADDITIONAL_NETWORK: "server_web"
# NEXTCLOUD_DATADIR: "/srv/nextcloud/data"
# volumes:
# - "nextcloud_aio_mastercontainer:/mnt/docker-aio-config"
# - "/var/run/docker.sock:/var/run/docker.sock:ro"
# networks:
# - web
gitea:
image: docker.gitea.com/gitea:1.25.2
container_name: gitea
environment:
- USER_UID=1100
- USER_GID=1100
restart: always
networks:
- web
volumes:
- /opt/gitea/data:/data{{ ':' ~ selinux_volume_option if selinux_volume_option else '' }}
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /home/git/.ssh:/data/git/.ssh{{ ':' ~ selinux_volume_option if selinux_volume_option else '' }}
ports:
- "3000:3000"
- "127.0.0.1:222:22"
{% if server_syncthing_enabled | default(true) | bool %}
syncthing:
image: docker.io/syncthing/syncthing:2
container_name: syncthing
hostname: syncthing
restart: unless-stopped
expose:
- "8384"
volumes:
- "/opt/syncthing/config:/var/syncthing{{ ':' ~ selinux_volume_option if selinux_volume_option else '' }}"
- "/srv/syncthing/data:/data{{ ':' ~ selinux_volume_option if selinux_volume_option else '' }}"
ports:
- "22000:22000/tcp"
- "22000:22000/udp"
- "21027:21027/udp"
networks:
- web
{% endif %}
networks:
web:
name: server_web
external: false
# volumes:
# nextcloud_aio_mastercontainer:
# name: nextcloud_aio_mastercontainer