summaryrefslogtreecommitdiff
path: root/roles/roundcube
diff options
context:
space:
mode:
Diffstat (limited to 'roles/roundcube')
-rw-r--r--roles/roundcube/tasks/main.yml22
-rw-r--r--roles/roundcube/templates/docker-compose.yml.j222
2 files changed, 44 insertions, 0 deletions
diff --git a/roles/roundcube/tasks/main.yml b/roles/roundcube/tasks/main.yml
new file mode 100644
index 0000000..d838433
--- /dev/null
+++ b/roles/roundcube/tasks/main.yml
@@ -0,0 +1,22 @@
+---
+- name: ensure rouncube docker/compose exist
+ file:
+ path: /etc/docker/compose/roundcube
+ state: directory
+ owner: root
+ group: root
+ mode: 0700
+
+- name: build roundcube docker-compose.yml.j2
+ template:
+ src: ../templates/docker-compose.yml.j2
+ dest: /etc/docker/compose/roundcube/docker-compose.yml
+ owner: root
+ group: root
+ mode: u=rw,g=r,o=r
+
+- name: daemon-reload and enable roundcube
+ ansible.builtin.systemd_service:
+ state: restarted
+ enabled: true
+ name: docker-compose@roundcube
diff --git a/roles/roundcube/templates/docker-compose.yml.j2 b/roles/roundcube/templates/docker-compose.yml.j2
new file mode 100644
index 0000000..c185aa2
--- /dev/null
+++ b/roles/roundcube/templates/docker-compose.yml.j2
@@ -0,0 +1,22 @@
+version: '3'
+
+services:
+ roundcube:
+ image: roundcube/roundcubemail:latest
+ container_name: roundcubemail
+ restart: unless-stopped
+ hostname: roundcube.internal.simponic.xyz
+ volumes:
+ - ./www:/var/www/html
+ - ./db/sqlite:/var/roundcube/db
+ ports:
+ - 127.0.0.1:9002:80
+ dns:
+ - {{ johan_ip }}
+ environment:
+ - ROUNDCUBEMAIL_DB_TYPE=sqlite
+ - ROUNDCUBEMAIL_SKIN=elastic
+ - ROUNDCUBEMAIL_DEFAULT_HOST=ssl://mail.simponic.xyz
+ - ROUNDCUBEMAIL_DEFAULT_PORT=993
+ - ROUNDCUBEMAIL_SMTP_SERVER=tls://mail.simponic.xyz
+ - ROUNDCUBEMAIL_SMTP_PORT=587