{ pkgs, ... }:{ project.name = "Cloud"; networks = { internal = { internal = true; external = false; }; external = { external = true; }; }; services = { cloud_nextcloud.service = { image = "nextcloud:27"; container_name = "cloud"; restart = "unless-stopped"; networks = [ "external" ]; volumes = [ "${DATA_PATH}/data/nextcloud:/var/www/html" "${DATA_PATH}/data/music:/media/music" "${DATA_PATH}/data/video:/media/video" "${DATA_PATH}/data/photo:/media/photo" ]; tmpfs = [ "/tmp" ]; labels = { "traefik.enable" = "true"; "traefik.http.routers.nextcloud.entrypoints" = "web-secure"; "traefik.http.routers.nextcloud.rule" = "Host(`cloud.${HOST_DOMAIN}`)"; "traefik.http.routers.nextcloud.tls" = "true"; "traefik.http.routers.nextcloud.middlewares" = "sts_headers,nextcloud-caldav"; "traefik.http.middlewares.nextcloud-caldav.redirectregex.permanent" = "true"; "traefik.http.middlewares.nextcloud-caldav.redirectregex.regex" = "^https://(.*)/.well-known/(card|cal)dav"; "traefik.http.middlewares.nextcloud-caldav.redirectregex.replacement" = "https://$\${1}/remote.php/dav/"; "traefik.http.middlewares.sts_headers.headers.stsSeconds" = "15552000"; "traefik.http.middlewares.sts_headers.headers.stsIncludeSubdomains" = "true"; }; }; cloud_office.service = { image = "collabora/code:latest"; container_name = "cloud_office"; restart = "unless-stopped"; networks = [ "external" ]; volumes = [ ]; environment = { username = "COLLABORA_USER"; password = "COLLABORA_PASSWORD"; aliasgroup1 = "https://cloud.${HOST_DOMAIN}"; server_name = "office.${HOST_DOMAIN}"; VIRTUAL_HOST = "office.${HOST_DOMAIN}"; VIRTUAL_PORT = "9980"; VIRTUAL_PROTO = "http"; DONT_GEN_SSL_CERT = "true"; RESOLVE_TO_PROXY_IP = "true"; NETWORK_ACCESS = "internal"; extra_params = "--o:ssl.enable=false --o:ssl.termination=true"; dictionaries = "en fr de jp"; }; labels = { "traefik.enable" = "true"; "traefik.http.routers.collabora.entrypoints" = "web-secure"; "traefik.http.routers.collabora.rule" = "Host(`office.${HOST_DOMAIN}`)"; "traefik.http.routers.collabora.tls" = "true"; }; }; cloud_etherpad.service = { image = "etherpad/etherpad:latest"; container_name = "etherpad"; restart = "unless-stopped"; networks = [ "external" ]; volumes = [ "${DATA_PATH}/ether/etherpad/data:/opt/etherpad-lite/var" "/${DATA_PATH}/ether/etherpad/APIKEY.txt:/opt/etherpad-lite/APIKEY.txt" ]; environment = { NODE_ENV = "production"; TITLE = "Helcel-Pad"; DB_TYPE = "mysql"; DB_HOST = DB_HOST; DB_PORT = DB_PORT; DB_NAME = "etherpad"; DB_USER = "ETHERPAD_DB_USER"; DB_PASS = "ETHERPAD_DB_PASSWORD"; DB_CHARSET = "utf8mb4"; DEFAULT_PAD_TEXT = "P A D"; PAD_OPTIONS_SHOW_LINE_NUMBERS = "true"; PAD_OPTIONS_USE_MONOSPACE_FONT = "true"; ADMIN_PASSWORD = "ETHERPAD_ADMIN_PASSWORD"; SKIN_VARIANTS = "super-dark-toolbar light-editor dark-background"; }; labels = { "traefik.enable" = "true"; "traefik.http.routers.etherpad.entrypoints" = "web-secure"; "traefik.http.routers.etherpad.rule" = "Host(`pad.${HOST_DOMAIN}`)"; "traefik.http.routers.etherpad.tls" = "true"; }; }; cloud_ethercalc.service = { image = "audreyt/ethercalc:latest"; container_name = "ethercalc"; restart = "unless-stopped"; networks = [ "external" "internal" ]; volumes = [ "${DATA_PATH}/ether/etherpad/data:/opt/etherpad-lite/var" "/${DATA_PATH}/ether/etherpad/APIKEY.txt:/opt/etherpad-lite/APIKEY.txt" ]; environment = { NODE_ENV = "production"; TITLE = "Helcel-Calc"; REDIS_PORT_6379_TCP_ADDR = "redis"; REDIS_PORT_6379_TCP_PORT = "6379"; ADMIN_PASSWORD = "ETHERPAD_ADMIN_PASSWORD"; SKIN_VARIANTS = "super-dark-toolbar light-editor dark-background"; }; labels = { "traefik.enable" = "true"; "traefik.http.routers.ethercalc.entrypoints" = "web-secure"; "traefik.http.routers.ethercalc.rule" = "Host(`calc.${HOST_DOMAIN}`)"; "traefik.http.routers.ethercalc.tls" = "true"; }; }; cloud_redis.service = { image = "redis:latest"; container_name = "ethercalc-redis"; restart = "unless-stopped"; networks = [ "internal" ]; volumes = [ "${DATA_PATH}/ether/ethercalc/redis:/data" ]; environment = { }; labels = { "traefik.enable" = "false"; }; }; }; }