diff --git a/docs/services/roundcube.md b/docs/services/roundcube.md new file mode 100644 index 0000000..86ef056 --- /dev/null +++ b/docs/services/roundcube.md @@ -0,0 +1,55 @@ +# Roundcube + +[Roundcube](https://roundcube.net/) is a browser-based multilingual IMAP client with an application-like user interface. It provides full functionality you expect from an email client, including MIME support, address book, folder manipulation, message searching and spell checking. + +## Dependencies + +This service requires the following other services: + +- a [Postgres](postgres.md) database +- a [Traefik](traefik.md) reverse-proxy server + +## Configuration + +To enable this service, add the following configuration to your `vars.yml` file and re-run the [installation](../installing.md) process: + +```yaml +######################################################################## +# # +# roundcube # +# # +######################################################################## + +roundcube_enabled: true + +roundcube_hostname: mash.example.com + +roundcube_path_prefix: "/roundcube" + +# The default IMAP server to connect to. +roundcube_default_imap_host: "imap.example.com" +# If not specified, the default port is 143. +roundcube_default_imap_port: "143" + +# The default SMTP server to use. +roundcube_smtp_server: "smtp.example.com" +# If not specified, the default port is 587. +roundcube_smtp_port: "587" + +######################################################################## +# # +# /roundcube # +# # +######################################################################## +``` + +In the example configuration above, we configure the service to be hosted at `https://mash.example.com/roundcube`. + +You can remove the `roundcube_path_prefix` variable definition, to make it default to `/`, so that the service is served at `https://mash.example.com/`. + + +## Usage + +After installation, you should be able to access your new Roundcube instance at the configured URL (see above). + +The username/password you will use to login are the same ones used in your IMAP server. diff --git a/docs/supported-services.md b/docs/supported-services.md index 8f78f18..54dbfc0 100644 --- a/docs/supported-services.md +++ b/docs/supported-services.md @@ -64,6 +64,7 @@ | [WireGuard Easy](https://github.com/WeeJeWel/wg-easy) | The easiest way to run [WireGuard](https://www.wireguard.com/) VPN + Web-based Admin UI. | [Link](services/wg-easy.md) | | [Forgejo](https://forgejo.org/) | An alternative fork of Gitea. Easy and painless self-hosted git server. | [Link](services/forgejo.md) | | [Woodpecker CI](https://woodpecker-ci.org/) | A simple Continuous Integration (CI) engine with great extensibility. | [Link](services/woodpecker-ci.md) | +| [Roundcube](https://roundcube.net/) | A browser-based multilingual IMAP client with an application-like user interface | [Link](services/roundcube.md) | | System-related | A collection of various system-related components | [Link](services/system.md) | diff --git a/group_vars/mash_servers b/group_vars/mash_servers index 8adaade..6d21d34 100644 --- a/group_vars/mash_servers +++ b/group_vars/mash_servers @@ -279,6 +279,8 @@ devture_systemd_service_manager_services_list_auto: | ([{'name': (wg_easy_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'wg-easy']}] if wg_easy_enabled else []) + ([{'name': (forgejo_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'forgejo', 'forgejo-server']}] if forgejo_enabled else []) + + + ([{'name': (roundcube_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'roundcube']}] if roundcube_enabled else []) }} ######################################################################## @@ -449,6 +451,12 @@ devture_postgres_managed_databases_auto: | 'username': forgejo_config_database_username, 'password': forgejo_config_database_password, }] if forgejo_enabled else []) + + + ([{ + 'name': roundcube_database_name, + 'username': roundcube_database_username, + 'password': roundcube_database_password, + }] if roundcube_enabled and roundcube_database_hostname == devture_postgres_identifier else []) }} ######################################################################## @@ -3157,3 +3165,49 @@ devture_woodpecker_ci_agent_config_agent_secret: "{{ devture_woodpecker_ci_serve # # ######################################################################## +######################################################################## +# # +# roundcube # +# # +######################################################################## + +roundcube_enabled: false + +roundcube_identifier: "{{ mash_playbook_service_identifier_prefix }}roundcube" + +roundcube_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_base_directory_name_prefix }}roundcube" + +roundcube_uid: "0" +roundcube_gid: "0" + +roundcube_database_type: "{{ 'postgresql' if devture_postgres_enabled else 'sqlite' }}" +roundcube_database_hostname: "{{ devture_postgres_identifier if devture_postgres_enabled else '' }}" +roundcube_database_port: "{{ '5432' if devture_postgres_enabled else '' }}" +roundcube_database_name: "{{ 'roundcube' if devture_postgres_enabled else '' }}" +roundcube_database_username: "{{ 'roundcube' if devture_postgres_enabled else '' }}" +roundcube_database_password: "{{ '%s' | format(mash_playbook_generic_secret_key) | password_hash('sha512', 'db.roundcube', rounds=655555) | to_uuid }}" + +roundcube_systemd_required_systemd_services_list: | + {{ + (['docker.service']) + + + ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled and roundcube_database_hostname == devture_postgres_identifier else []) + }} + +roundcube_container_labels_traefik_enabled: "{{ mash_playbook_traefik_labels_enabled }}" +roundcube_container_labels_traefik_docker_network: "{{ mash_playbook_reverse_proxyable_services_additional_network }}" +roundcube_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}" +roundcube_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}" + +roundcube_container_additional_networks: | + {{ + ([mash_playbook_reverse_proxyable_services_additional_network] if mash_playbook_reverse_proxyable_services_additional_network else []) + + + ([devture_postgres_container_network] if devture_postgres_enabled and roundcube_database_hostname == devture_postgres_identifier and roundcube_container_network != devture_postgres_container_network else []) + }} + +######################################################################## +# # +# /roundcube # +# # +######################################################################## diff --git a/requirements.yml b/requirements.yml index 061967d..9eba02c 100644 --- a/requirements.yml +++ b/requirements.yml @@ -196,3 +196,6 @@ - src: git+https://github.com/mother-of-all-self-hosting/ansible-role-wg-easy.git version: v7-0 name: wg_easy +- src: git+https://git.sr.ht/~sergiodj/ansible-role-roundcube + version: v1.6.3-0 + name: roundcube diff --git a/setup.yml b/setup.yml index b5c25ff..dbfc6bb 100644 --- a/setup.yml +++ b/setup.yml @@ -163,6 +163,8 @@ - role: galaxy/com.devture.ansible.role.woodpecker_ci_server - role: galaxy/com.devture.ansible.role.woodpecker_ci_agent + - role: galaxy/roundcube + - role: galaxy/auxiliary - when: devture_systemd_service_manager_enabled | bool