From b658384e389bc376ffeccd60b85deb84567f9d5e Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 10 Apr 2024 17:39:51 -0400 Subject: [PATCH] Mailpit --- docker-compose.production.yml | 6 +-- docker-compose.staging.yml | 6 +-- docker/mailpit/Dockerfile | 1 + docker/mailpit/Dockerfile.production | 1 + docker/redis/.gitkeep | 1 - docker/send/Dockerfile | 1 - docker/send/Dockerfile.production | 1 - stack.production.yml | 63 +++++++++------------------- stack.staging.yml | 55 +++++++++--------------- 9 files changed, 47 insertions(+), 88 deletions(-) create mode 100644 docker/mailpit/Dockerfile create mode 100644 docker/mailpit/Dockerfile.production delete mode 100644 docker/redis/.gitkeep delete mode 100644 docker/send/Dockerfile delete mode 100644 docker/send/Dockerfile.production diff --git a/docker-compose.production.yml b/docker-compose.production.yml index fb85897..53b3371 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -1,7 +1,7 @@ version: "3.9" services: - send: + mailpit: build: - context: docker/send + context: docker/mailpit dockerfile: Dockerfile.production - image: git.nixc.us/nixius/send:production-web + image: git.nixc.us/nixius/mailpit:production diff --git a/docker-compose.staging.yml b/docker-compose.staging.yml index fe6e036..1cd5e1e 100644 --- a/docker-compose.staging.yml +++ b/docker-compose.staging.yml @@ -1,6 +1,6 @@ version: "3.9" services: - send: + mailpit: build: - context: docker/send - image: git.nixc.us/nixius/send:staging-web + context: docker/mailpit + image: git.nixc.us/nixius/mailpit:staging diff --git a/docker/mailpit/Dockerfile b/docker/mailpit/Dockerfile new file mode 100644 index 0000000..bb52ad6 --- /dev/null +++ b/docker/mailpit/Dockerfile @@ -0,0 +1 @@ +FROM axllent/mailpit \ No newline at end of file diff --git a/docker/mailpit/Dockerfile.production b/docker/mailpit/Dockerfile.production new file mode 100644 index 0000000..fe4d8ab --- /dev/null +++ b/docker/mailpit/Dockerfile.production @@ -0,0 +1 @@ +FROM git.nixc.us/nixius/mailpit:staging \ No newline at end of file diff --git a/docker/redis/.gitkeep b/docker/redis/.gitkeep deleted file mode 100644 index 076fde5..0000000 --- a/docker/redis/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -# TODO: Deploy a static version of redis maybe for what its worth. \ No newline at end of file diff --git a/docker/send/Dockerfile b/docker/send/Dockerfile deleted file mode 100644 index 2d9721e..0000000 --- a/docker/send/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM registry.gitlab.com/timvisee/send:latest \ No newline at end of file diff --git a/docker/send/Dockerfile.production b/docker/send/Dockerfile.production deleted file mode 100644 index c8e87f6..0000000 --- a/docker/send/Dockerfile.production +++ /dev/null @@ -1 +0,0 @@ -FROM git.nixc.us/nixius/send:staging-web \ No newline at end of file diff --git a/stack.production.yml b/stack.production.yml index 078ccc2..b2f08a1 100644 --- a/stack.production.yml +++ b/stack.production.yml @@ -2,60 +2,37 @@ version: "3.7" networks: traefik: external: true - default: + mailpit: + external: true services: - web: - image: git.nixc.us/nixius/send:production-web + mailpit: + image: git.nixc.us/nixius/mailpit:production depends_on: - redis environment: - REDIS_HOST: send_redis - FILE_DIR: /uploads - DETECT_BASE_URL: "true" - MAX_FILE_SIZE: 4294967296 # 2147483648 #4,294,967,296 - MAX_FILES_PER_ARCHIVE: 64 - MAX_DOWNLOADS: 5 - DOWNLOAD_COUNTS: "2,1,2,5"#,10,15,25,50,100,1000" - EXPIRE_TIMES_SECONDS: "3600,86400,604800,2592000,31536000" - DEFAULT_DOWNLOADS: "1" - DEFAULT_EXPIRE_SECONDS: "86400" - volumes: - - /mnt/tank/persist/nixc.us/send/production/uploads:/uploads + MP_MAX_MESSAGES: 5000 + MP_DATA_FILE: /data/mailpit.db + MP_SMTP_AUTH_ACCEPT_ANY: 1 + MP_SMTP_AUTH_ALLOW_INSECURE: 1 + # volumes: + # - /mnt/tank/persist/nixc.us/mailpit/production/uploads:/data networks: - default - traefik deploy: replicas: 1 - placement: - constraints: - - node.hostname == macmini8 + # placement: + # constraints: + # - node.hostname == macmini8 labels: - "traefik.enable=true" - - "traefik.http.routers.production_send_web.tls=true" - - "traefik.http.services.production_send_web.loadbalancer.server.port=1443" - - "traefik.http.routers.production_send_web.rule=Host(`send.nixc.us`)" - - "traefik.http.routers.production_send_web.entrypoints=websecure" - - "traefik.http.routers.production_send_web.tls.certresolver=letsencryptresolver" - - "traefik.http.routers.production_send_web.service=production_send_web" + - "traefik.http.routers.production_mailpit_mailpit.tls=true" + - "traefik.http.services.production_mailpit_mailpit.loadbalancer.server.port=8025" + - "traefik.http.routers.production_mailpit_mailpit.rule=Host(`mailpit.nixc.us`)" + - "traefik.http.routers.production_mailpit_mailpit.entrypoints=websecure" + - "traefik.http.routers.production_mailpit_mailpit.tls.certresolver=letsencryptresolver" + - "traefik.http.routers.production_mailpit_mailpit.service=production_mailpit_mailpit" - "traefik.docker.network=traefik" networks: - traefik - - default - redis: - image: redis:alpine - networks: - - default - redis: - image: redis - deploy: - replicas: 1 - placement: - constraints: - - node.hostname == macmini8 - labels: - - traefik.enable=false - volumes: - - /mnt/tank/persist/nixc.us/send/production/db:/data - networks: - - default - entrypoint: redis-server \ No newline at end of file + - mailpit \ No newline at end of file diff --git a/stack.staging.yml b/stack.staging.yml index 7ae6869..5e2c3fa 100644 --- a/stack.staging.yml +++ b/stack.staging.yml @@ -2,54 +2,37 @@ version: "3.7" networks: traefik: external: true - default: + mailpit: + external: true services: - web: - image: git.nixc.us/nixius/send:staging-web + mailpit: + image: git.nixc.us/nixius/mailpit:staging depends_on: - redis environment: - REDIS_HOST: send_redis - FILE_DIR: /uploads - DETECT_BASE_URL: "true" - MAX_FILE_SIZE: 4294967296 # 2147483648 #4,294,967,296 - MAX_FILES_PER_ARCHIVE: 64 - MAX_DOWNLOADS: 20 - DOWNLOAD_COUNTS: "2,1,2,5,10,15,25,50,100,1000" - EXPIRE_TIMES_SECONDS: "3600,86400,604800,2592000,31536000" - DEFAULT_DOWNLOADS: "1" - DEFAULT_EXPIRE_SECONDS: "86400" + MP_MAX_MESSAGES: 5000 + MP_DATA_FILE: /data/mailpit.db + MP_SMTP_AUTH_ACCEPT_ANY: 1 + MP_SMTP_AUTH_ALLOW_INSECURE: 1 # volumes: - # - /mnt/tank/persist/aenow.com/send/staging/uploads:/uploads + # - /mnt/tank/persist/nixc.us/mailpit/staging/uploads:/data networks: - default - traefik deploy: replicas: 1 + # placement: + # constraints: + # - node.hostname == macmini8 labels: - "traefik.enable=true" - - "traefik.http.routers.staging_send_web.tls=true" - - "traefik.http.services.staging_send_web.loadbalancer.server.port=1443" - - "traefik.http.routers.staging_send_web.rule=Host(`staging.send.aenow.com`)" - - "traefik.http.routers.staging_send_web.entrypoints=websecure" - - "traefik.http.routers.staging_send_web.tls.certresolver=letsencryptresolver" - - "traefik.http.routers.staging_send_web.service=staging_send_web" + - "traefik.http.routers.staging_mailpit_mailpit.tls=true" + - "traefik.http.services.staging_mailpit_mailpit.loadbalancer.server.port=8025" + - "traefik.http.routers.staging_mailpit_mailpit.rule=Host(`mailpit.nixc.us`)" + - "traefik.http.routers.staging_mailpit_mailpit.entrypoints=websecure" + - "traefik.http.routers.staging_mailpit_mailpit.tls.certresolver=letsencryptresolver" + - "traefik.http.routers.staging_mailpit_mailpit.service=staging_mailpit_mailpit" - "traefik.docker.network=traefik" networks: - traefik - - default - redis: - image: redis:alpine - networks: - - default - redis: - image: redis - deploy: - replicas: 1 - labels: - - traefik.enable=false - # volumes: - # - /mnt/tank/persist/nixc.us/send/staging/db:/data - networks: - - default - entrypoint: redis-server \ No newline at end of file + - mailpit \ No newline at end of file