From 85e6e693f87d54be9d61142edab248767d05535f Mon Sep 17 00:00:00 2001 From: traveler Date: Wed, 22 Jan 2025 13:11:13 -0600 Subject: [PATCH] First --- NG-Homepage.yaml | 16 ++++ NG-Proxy.yaml | 64 +++++++++++++ NG-RoundCube.yaml | 37 +++++++ NG-gitea.yaml | 36 +++++++ README.md | 1 + docker-compose.yaml | 27 ++++++ mailu.env | 170 ++++++++++++++++++++++++++++++++ tmp/docker-compose.yml | 213 +++++++++++++++++++++++++++++++++++++++++ 8 files changed, 564 insertions(+) create mode 100755 NG-Homepage.yaml create mode 100755 NG-Proxy.yaml create mode 100755 NG-RoundCube.yaml create mode 100755 NG-gitea.yaml create mode 100755 README.md create mode 100755 docker-compose.yaml create mode 100755 mailu.env create mode 100755 tmp/docker-compose.yml diff --git a/NG-Homepage.yaml b/NG-Homepage.yaml new file mode 100755 index 0000000..34e47f9 --- /dev/null +++ b/NG-Homepage.yaml @@ -0,0 +1,16 @@ +services: + homepage: + image: ghcr.io/gethomepage/homepage:latest + container_name: homepage + environment: + - TZ=America/Chicago + - PGID=998 + - PUID=1001 + ports: + - 3200:3000 + volumes: + - /DockerVol/homepage:/app/config # Make sure your local config directory exists + - /var/run/docker.sock:/var/run/docker.sock:ro # optional, for docker integrations + # networks: + # - netgrimoire + restart: unless-stopped \ No newline at end of file diff --git a/NG-Proxy.yaml b/NG-Proxy.yaml new file mode 100755 index 0000000..67edd8a --- /dev/null +++ b/NG-Proxy.yaml @@ -0,0 +1,64 @@ +version: "2.2" +services: + + + + # swag: + # image: ghcr.io/linuxserver/swag + # container_name: swag + + # cap_add: + # - NET_ADMIN + # networks: + # - netgrimoire + # environment: + # - TZ=America/Chicago + # - PGID=998 + # - PUID=1001 + # - URL=wasted-bandwidth.net + # - SUBDOMAINS=alternate + # - VALIDATION=http + # - EMAIL=phil@pncharris.com + # # - STAGING=true + # - EXTRA_DOMAINS=roundcube.wasted-bandwidth.net,cliff.netgrimoire.com + # #,roundcube.pncharris.com,books.pncharris.com,webmail.pncharris.com,comics.netgrimoire.com + # volumes: + # - /DockerVol/swag/config:/config + # ports: + # - 443:443 + # - 80:80 + # restart: unless-stopped + + + npm: + image: 'jc21/nginx-proxy-manager:latest' + container_name: npm + restart: unless-stopped + ports: + # These ports are in format : + - '80:80' # Public HTTP Port + - '443:443' # Public HTTPS Port + - '81:81' # Admin Web Port + # Add any other Stream port you want to expose + # - '21:21' # FTP + networks: + - netgrimoire + # Uncomment the next line if you uncomment anything in the section + # environment: + # Uncomment this if you want to change the location of + # the SQLite DB file within the container + # DB_SQLITE_FILE: "/data/database.sqlite" + + # Uncomment this if IPv6 is not enabled on your host + # DISABLE_IPV6: 'true' + + volumes: + - /DockerVol/npm/data:/data + - /DockerVol/npm/letsencrypt:/etc/letsencrypt + + + + + + + \ No newline at end of file diff --git a/NG-RoundCube.yaml b/NG-RoundCube.yaml new file mode 100755 index 0000000..55c77f9 --- /dev/null +++ b/NG-RoundCube.yaml @@ -0,0 +1,37 @@ +version: "2.2" +services: + + roundcube: + image: roundcube/roundcubemail:latest + container_name: roundcube + hostname: roundcube + # networks: + # - netgrimoire +# restart: unless-stopped + # depends_on: + # - roundcubedb + # links: + # - roundcubedb + volumes: + - /DockerVol/roundcube/www:/var/www/html + ports: + - 9019:80 + environment: + - ROUNDCUBEMAIL_DB_TYPE=mysql + - ROUNDCUBEMAIL_DB_HOST=mysql-mailcow + - ROUNDCUBEMAIL_DB_USER=roundcube + - ROUNDCUBEMAIL_DB_PASSWORD=gr2wfy4gWTfIDjwFILgPuTWH0gDi + - ROUNDCUBEMAIL_DB_NAME=roundcubemail + - ROUNDCUBEMAIL_SKIN=elastic + - ROUNDCUBEMAIL_DEFAULT_HOST=tls://hermes.netgrimoire.com + - ROUNDCUBEMAIL_SMTP_SERVER=tls://hermes.netgrimoire.com + labels: + - homepage.group=Media + - homepage.name=Emby + - homepage.icon=emby.png + - homepage.href=http://emby.home/ + - homepage.description=Media server + + + + \ No newline at end of file diff --git a/NG-gitea.yaml b/NG-gitea.yaml new file mode 100755 index 0000000..827d721 --- /dev/null +++ b/NG-gitea.yaml @@ -0,0 +1,36 @@ +services: + gitea: + image: gitea/gitea:nightly + container_name: gitea + environment: + - USER_UID=1000 + - USER_GID=1000 + - GITEA__database__DB_TYPE=postgres + - GITEA__database__HOST=giteadb:5432 + - GITEA__database__NAME=gitea + - GITEA__database__USER=gitea + - GITEA__database__PASSWD=gitea + restart: always + networks: + - netgrimoire + volumes: + - /DockerVol/gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "3000:3000" + - "222:22" + depends_on: + - giteadb + + giteadb: + image: postgres:14 + restart: always + environment: + - POSTGRES_USER=gitea + - POSTGRES_PASSWORD=gitea + - POSTGRES_DB=gitea + networks: + - netgrimoire + volumes: + - /DockerVol/gitea/postgres:/var/lib/postgresql/data \ No newline at end of file diff --git a/README.md b/README.md new file mode 100755 index 0000000..a1c1a87 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +new one \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100755 index 0000000..adf5342 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,27 @@ + +version: "2.2" +include: + # - NG-Proxy.yaml + - NG-RoundCube.yaml + - NG-Homepage.yaml + # - NG-gitea.yaml + # - NG-Mailu.yaml +# - NG-Utils.yaml + + + +networks: + netgrimoire: + driver: overlay + external: true + + + + + + + + + + + diff --git a/mailu.env b/mailu.env new file mode 100755 index 0000000..17b2f63 --- /dev/null +++ b/mailu.env @@ -0,0 +1,170 @@ +# Mailu main configuration file +# +# This file is autogenerated by the configuration management wizard for compose flavor. +# For a detailed list of configuration variables, see the documentation at +# https://mailu.io + +################################### +# Common configuration variables +################################### + +# Set to a randomly generated 16 bytes string +SECRET_KEY=0CABEGXA4ALOCUG0 + +# Subnet of the docker network. This should not conflict with any networks to which your system is connected. (Internal and external!) +SUBNET=10.0.1.0/24 + +# Main mail domain +DOMAIN=netgrimoire.com + +# Hostnames for this server, separated with commas +HOSTNAMES=mail.netgrimoire.com,alternate.netgrimoire.com,server.netgrimoire.com + +# Postmaster local part (will append the main mail domain) +POSTMASTER=admin + +# Choose how secure connections will behave (value: letsencrypt, cert, notls, mail, mail-letsencrypt) +#TLS_FLAVOR=mail-letsencrypt +TLS_FLAVOR=cert + +# addded by phil +#TLS_CERT_FILENAME=fullchain.pem + +# Authentication rate limit per IP (per /24 on ipv4 and /48 on ipv6) +AUTH_RATELIMIT_IP=5/hour + +# Authentication rate limit per user (regardless of the source-IP) +AUTH_RATELIMIT_USER=50/day + +# Opt-out of statistics, replace with "True" to opt out +DISABLE_STATISTICS=True + +################################### +# Optional features +################################### + +# Expose the admin interface (value: true, false) +ADMIN=true + +# Choose which webmail to run if any (values: roundcube, snappymail, none). To enable this feature, recreate the docker-compose.yml file via setup. +WEBMAIL=roundcube + +# Expose the API interface (value: true, false) +API=false + +# Dav server implementation (value: radicale, none). To enable this feature, recreate the docker-compose.yml file via setup. +WEBDAV=radicale + +# Antivirus solution (value: clamav, none). To enable this feature, recreate the docker-compose.yml file via setup. +ANTIVIRUS=clamav + +# Scan Macros solution (value: true, false). To enable this feature, recreate the docker-compose.yml file via setup. +SCAN_MACROS=true + +################################### +# Mail settings +################################### + +# Message size limit in bytes +# Default: accept messages up to 50MB +# Max attachment size will be 33% smaller +MESSAGE_SIZE_LIMIT=50000000 + +# Message rate limit (per user) +MESSAGE_RATELIMIT=200/day + +# Networks granted relay permissions +# Use this with care, all hosts in this networks will be able to send mail without authentication! +RELAYNETS= + +# Will relay all outgoing mails if configured +RELAYHOST= + +# Enable fetchmail +FETCHMAIL_ENABLED=true + +# Fetchmail delay +FETCHMAIL_DELAY=600 + +# Recipient delimiter, character used to delimiter localpart from custom address part +RECIPIENT_DELIMITER=+ + +# DMARC rua and ruf email +DMARC_RUA=admin +DMARC_RUF=admin + +# Welcome email, enable and set a topic and body if you wish to send welcome +# emails to all users. +WELCOME=false +WELCOME_SUBJECT=Welcome to your new email account +WELCOME_BODY=Welcome to your new email account, if you can read this, then it is configured properly! + +# Maildir Compression +# choose compression-method, default: none (value: gz, bz2, zstd) +COMPRESSION= +# change compression-level, default: 6 (value: 1-9) +COMPRESSION_LEVEL= + +# IMAP full-text search is enabled by default. +# Set the following variable to off in order to disable the feature +# or a comma separated list of language codes to support +FULL_TEXT_SEARCH=en + +################################### +# Web settings +################################### + +# Path to redirect / to +WEBROOT_REDIRECT=/webmail + +# Path to the admin interface if enabled +WEB_ADMIN=/admin + +# Path to the webmail if enabled +WEB_WEBMAIL=/webmail + +# Path to the API interface if enabled +WEB_API=/api + +# Website name +SITENAME=Mailu + +# Linked Website URL +WEBSITE=https://mail.netgrimoire.com + + + +################################### +# Advanced settings +################################### + +# Docker-compose project name, this will prepended to containers names. +COMPOSE_PROJECT_NAME=mailu + +# Number of rounds used by the password hashing scheme +CREDENTIAL_ROUNDS=12 + +# Header to take the real ip from +REAL_IP_HEADER= + +# IPs for nginx set_real_ip_from (CIDR list separated by commas) +REAL_IP_FROM= + +# choose wether mailu bounces (no) or rejects (yes) mail when recipient is unknown (value: yes, no) +REJECT_UNLISTED_RECIPIENT= + +# Log level threshold in start.py (value: CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET) +LOG_LEVEL=INFO + +# Timezone for the Mailu containers. See this link for all possible values https://en.wikipedia.org/wiki/List_of_tz_database_time_zones +TZ=Etc/UTC + +# Default spam threshold used for new users +DEFAULT_SPAM_THRESHOLD=80 + +# API token required for authenticating to the RESTful API. +# This is a mandatory setting for using the RESTful API. +API_TOKEN= + +# Whether tika should be enabled (scan/OCR email attachements). To enable this feature, recreate the docker-compose.yml file via setup. +FULL_TEXT_SEARCH_ATTACHMENTS=true \ No newline at end of file diff --git a/tmp/docker-compose.yml b/tmp/docker-compose.yml new file mode 100755 index 0000000..9098f35 --- /dev/null +++ b/tmp/docker-compose.yml @@ -0,0 +1,213 @@ +# This file is auto-generated by the Mailu configuration wizard. +# Please read the documentation before attempting any change. +# Generated for compose flavor + +services: + + # External dependencies + redis: + image: redis:alpine + restart: always + volumes: + - "/mailu/redis:/data" + depends_on: + - resolver + dns: + - 10.0.1.254 + + # Core services + front: + image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}nginx:${MAILU_VERSION:-2024.06} + restart: always + env_file: mailu.env + logging: + driver: journald + options: + tag: mailu-front + ports: + - "192.168.5.16:80:80" + - "192.168.5.16:443:443" + - "192.168.5.16:25:25" + - "192.168.5.16:465:465" + - "192.168.5.16:587:587" + - "192.168.5.16:110:110" + - "192.168.5.16:995:995" + - "192.168.5.16:143:143" + - "192.168.5.16:993:993" + - "192.168.5.16:4190:4190" + networks: + - default + volumes: + - "/mailu/certs:/certs" + - "/mailu/overrides/nginx:/overrides:ro" + depends_on: + - resolver + dns: + - 10.0.1.254 + + resolver: + image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}unbound:${MAILU_VERSION:-2024.06} + env_file: mailu.env + logging: + driver: journald + options: + tag: mailu-resolver + restart: always + networks: + default: + ipv4_address: 10.0.1.254 + + admin: + image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}admin:${MAILU_VERSION:-2024.06} + restart: always + env_file: mailu.env + logging: + driver: journald + options: + tag: mailu-admin + volumes: + - "/mailu/data:/data" + - "/mailu/dkim:/dkim" + depends_on: + - redis + - resolver + dns: + - 10.0.1.254 + + imap: + image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}dovecot:${MAILU_VERSION:-2024.06} + restart: always + env_file: mailu.env + logging: + driver: journald + options: + tag: mailu-imap + volumes: + - "/mailu/mail:/mail" + - "/mailu/overrides/dovecot:/overrides:ro" + networks: + - default + - fts_attachments + depends_on: + - front + - fts_attachments + - resolver + dns: + - 10.0.1.254 + + smtp: + image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}postfix:${MAILU_VERSION:-2024.06} + restart: always + env_file: mailu.env + logging: + driver: journald + options: + tag: mailu-smtp + volumes: + - "/mailu/mailqueue:/queue" + - "/mailu/overrides/postfix:/overrides:ro" + depends_on: + - front + - resolver + dns: + - 10.0.1.254 + + oletools: + image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}oletools:${MAILU_VERSION:-2024.06} + hostname: oletools + logging: + driver: journald + options: + tag: mailu-oletools + restart: always + networks: + - oletools + depends_on: + - resolver + dns: + - 10.0.1.254 + + fts_attachments: + image: apache/tika:2.9.2.1-full + hostname: tika + logging: + driver: journald + options: + tag: mailu-tika + restart: always + networks: + - fts_attachments + depends_on: + - resolver + dns: + - 10.0.1.254 + healthcheck: + test: ["CMD-SHELL", "wget -nv -t1 -O /dev/null http://127.0.0.1:9998/tika || exit 1"] + interval: 10s + timeout: 5s + retries: 3 + start_period: 10s + + antispam: + image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}rspamd:${MAILU_VERSION:-2024.06} + hostname: antispam + restart: always + env_file: mailu.env + logging: + driver: journald + options: + tag: mailu-antispam + networks: + - default + - oletools + - clamav + volumes: + - "/mailu/filter:/var/lib/rspamd" + - "/mailu/overrides/rspamd:/overrides:ro" + depends_on: + - front + - redis + - oletools + - antivirus + - resolver + dns: + - 10.0.1.254 + + # Optional services + antivirus: + image: clamav/clamav-debian:1.2.3-45 + restart: always + logging: + driver: journald + options: + tag: mailu-antivirus + networks: + - clamav + volumes: + - "/mailu/filter/clamav:/var/lib/clamav" + healthcheck: + test: ["CMD-SHELL", "kill -0 `cat /tmp/clamd.pid` && kill -0 `cat /tmp/freshclam.pid`"] + interval: 10s + timeout: 5s + retries: 3 + start_period: 10s + + + + # Webmail + +networks: + default: + driver: bridge + ipam: + driver: default + config: + - subnet: 10.0.1.0/24 + clamav: + driver: bridge + oletools: + driver: bridge + internal: true + fts_attachments: + driver: bridge + internal: true