Initial commit after Claude implementation
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
---
|
||||
stalwart_data_dir: "{{ sovereign_base_dir }}/stalwart"
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: restart stalwart
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ stalwart_data_dir }}"
|
||||
state: present
|
||||
recreate: always
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
- name: Create Stalwart directories
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
loop:
|
||||
- "{{ stalwart_data_dir }}"
|
||||
- "{{ stalwart_data_dir }}/data"
|
||||
|
||||
- name: Deploy Stalwart docker-compose
|
||||
ansible.builtin.template:
|
||||
src: docker-compose.yml.j2
|
||||
dest: "{{ stalwart_data_dir }}/docker-compose.yml"
|
||||
mode: '0644'
|
||||
notify: restart stalwart
|
||||
|
||||
- name: Start Stalwart
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ stalwart_data_dir }}"
|
||||
state: present
|
||||
@@ -0,0 +1,32 @@
|
||||
services:
|
||||
stalwart:
|
||||
image: stalwartlabs/mail-server:{{ stalwart_version }}
|
||||
container_name: stalwart
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- {{ stalwart_data_dir }}/data:/opt/stalwart-mail
|
||||
ports:
|
||||
- "25:25" # SMTP
|
||||
- "465:465" # SMTPS
|
||||
- "587:587" # SMTP submission
|
||||
- "993:993" # IMAPS
|
||||
- "4190:4190" # ManageSieve
|
||||
environment:
|
||||
TZ: UTC
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.stalwart.rule=Host(`{{ stalwart_domain }}`)"
|
||||
- "traefik.http.routers.stalwart.tls=true"
|
||||
- "traefik.http.routers.stalwart.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.services.stalwart.loadbalancer.server.port=8080"
|
||||
networks:
|
||||
- {{ sovereign_network_name }}
|
||||
logging:
|
||||
driver: gelf
|
||||
options:
|
||||
gelf-address: "udp://{{ graylog_host }}:{{ graylog_gelf_port }}"
|
||||
tag: "stalwart"
|
||||
|
||||
networks:
|
||||
{{ sovereign_network_name }}:
|
||||
external: true
|
||||
Reference in New Issue
Block a user