1
0
Fork 0

Add Outline support

This commit is contained in:
Slavi Pantaleev 2023-09-19 11:15:33 +03:00
parent 9d2b665898
commit 4abcaf0e6c
5 changed files with 142 additions and 0 deletions

79
docs/services/outline.md Normal file
View file

@ -0,0 +1,79 @@
# Outline
[Outline](https://www.getoutline.com/) is an open-source knowledge base for growing teams.
## Dependencies
This service requires the following other services:
- [Postgres](postgres.md)
- [Redis](redis.md)
- a [Traefik](traefik.md) reverse-proxy server
- an AWS S3 (or S3-compatible) public bucket for storing assets, configured as described [here](https://docs.getoutline.com/s/hosting/doc/file-storage-N4M0T6Ypu7)
## Configuration
To enable this service, besides enabling the [required Dependencies](#dependencies), add the following configuration to your `vars.yml` file and re-run the [installation](../installing.md) process:
```yaml
########################################################################
# #
# outline #
# #
########################################################################
outline_enabled: true
outline_hostname: outline.example.com
# This must be generated with: `openssl rand -hex 32`
outline_environment_variable_secret_key: ''
# The configuration below connects Outline to the Redis instance, for session storage purposes.
# You may wish to run a separate Redis instance for Outline, because Redis is not multi-tenant.
# Read more in docs/services/redis.md.
outline_redis_hostname: "{{ redis_identifier if redis_enabled else '' }}"
outline_container_additional_networks_custom: |
{{
[redis_container_network]
}}
outline_environment_variable_aws_access_key_id: ''
outline_environment_variable_aws_secret_access_key: ''
outline_environment_variable_aws_region: eu-central-1 # example
outline_environment_variable_aws_s3_upload_bucket_url: https://OUTLINE_ASSETS_BUCKET_NAME.s3.eu-central-1.amazonaws.com
outline_environment_variable_aws_s3_upload_bucket_name: OUTLINE_ASSETS_BUCKET_NAME
outline_environment_variable_aws_s3_force_path_style: false
# At least one authentication method MUST be enabled for Outline to work.
# See the "Authentication" section below.
########################################################################
# #
# /outline #
# #
########################################################################
```
### URL
In the example configuration above, we configure the service to be hosted at `https://outline.example.com`.
While the Outline Ansible role provides an `outline_path_prefix` variable, Outline does not support being hosted at a subpath right now.
### Authentication
For Outline to work, at least one [authentication method](https://docs.getoutline.com/s/hosting/doc/authentication-7ViKRmRY5o) must be enabled.
The Outline Ansible role provides dedicated Ansible variables for configuring these authentication methods via environment variables (see the `outline_environment_variable_*` variables in [`defaults/main.yml` of ansible-role-outline](https://github.com/mother-of-all-self-hosting/ansible-role-outline/blob/main/defaults/main.yml)).
If you need to pass additional environment variables to Outline, for which dedicated Ansible variables are not available, you can use `outline_environment_variables_additional_variables`.
If you define SMTP settings (see the `outline_environment_variable_smtp_*` variables in `defaults/main.yml`), the [Email magic link](https://docs.getoutline.com/s/hosting/doc/email-magic-link-N2CPh5tmTS) authentication method will be enabled:
Unfortunately, even with SMTP settings being defined, we haven't been able to get Outline to succesfully send emails just yet, hitting issues similar to [this one](https://github.com/outline/outline/discussions/2605).

View file

@ -40,6 +40,7 @@
| [Navidrome](https://www.navidrome.org/) | [Subsonic-API](http://www.subsonic.org/pages/api.jsp) compatible music server | [Link](services/navidrome.md)
| [NetBox](https://docs.netbox.dev/en/stable/) | Web application that provides [IP address management (IPAM)](https://en.wikipedia.org/wiki/IP_address_management) and [data center infrastructure management (DCIM)](https://en.wikipedia.org/wiki/Data_center_management#Data_center_infrastructure_management) functionality | [Link](services/netbox.md) |
| [Nextcloud](https://nextcloud.com/) | The most popular self-hosted collaboration solution for tens of millions of users at thousands of organizations across the globe. | [Link](services/nextcloud.md) |
| [Outline](https://www.getoutline.com/) | An open-source knowledge base for growing teams. | [Link](services/outline.md) |
| [Owncast](https://owncast.online/) | Owncast is a free and open source live video and web chat server for use with existing popular broadcasting software. | [Link](services/owncast.md) |
| [PeerTube](https://joinpeertube.org/) | A tool for sharing online videos | [Link](services/peertube.md) |
| [Postgis](https://postgis.net/) | A spatial database extender for PostgreSQL object-relational database | [Link](services/postgis.md) |

View file

@ -236,6 +236,8 @@ devture_systemd_service_manager_services_list_auto: |
+
([{'name': (mariadb_identifier + '.service'), 'priority': 500, 'groups': ['mash', 'mariadb']}] if mariadb_enabled else [])
+
([{'name': (outline_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'outline']}] if outline_enabled else [])
+
([{'name': (owncast_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'owncast']}] if owncast_enabled else [])
+
([{'name': (peertube_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'peertube']}] if peertube_enabled else [])
@ -412,6 +414,12 @@ devture_postgres_managed_databases_auto: |
'password': nextcloud_database_password,
}] if nextcloud_enabled else [])
+
([{
'name': outline_database_name,
'username': outline_database_username,
'password': outline_database_password,
}] if outline_enabled and outline_database_hostname == devture_postgres_identifier else [])
+
([{
'name': peertube_config_database_name,
'username': peertube_config_database_username,
@ -786,6 +794,8 @@ backup_borg_systemd_required_services_list: |
# #
########################################################################
########################################################################
# #
# Changedetection.io #
@ -818,6 +828,7 @@ changedetection_container_labels_traefik_tls_certResolver: "{{ devture_traefik_c
########################################################################
########################################################################
# #
# clickhouse #
@ -2308,6 +2319,52 @@ mariadb_managed_databases_auto: |
########################################################################
########################################################################
# #
# outline #
# #
########################################################################
outline_enabled: false
outline_identifier: "{{ mash_playbook_service_identifier_prefix }}outline"
outline_uid: "{{ mash_playbook_uid }}"
outline_gid: "{{ mash_playbook_gid }}"
outline_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_base_directory_name_prefix }}outline"
outline_systemd_required_services_list_auto: |
{{
([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled and outline_database_hostname == devture_postgres_identifier else [])
}}
outline_container_additional_networks_auto: |
{{
([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 outline_database_hostname == devture_postgres_identifier and outline_container_network != devture_postgres_container_network else [])
}}
outline_container_labels_traefik_enabled: "{{ mash_playbook_traefik_labels_enabled }}"
outline_container_labels_traefik_docker_network: "{{ mash_playbook_reverse_proxyable_services_additional_network }}"
outline_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
outline_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
outline_environment_variable_utils_secret: "{{ '%s' | format(mash_playbook_generic_secret_key) | password_hash('sha512', 'utils.out', rounds=655555) | to_uuid }}"
outline_database_hostname: "{{ devture_postgres_identifier if devture_postgres_enabled else '' }}"
outline_database_port: "{{ '5432' if devture_postgres_enabled else '' }}"
outline_database_password: "{{ '%s' | format(mash_playbook_generic_secret_key) | password_hash('sha512', 'db.out', rounds=655555) | to_uuid }}"
outline_database_sslmode: "{{ 'disable' if devture_postgres_enabled and outline_database_hostname == devture_postgres_identifier else 'prefer' }}"
########################################################################
# #
# /outline #
# #
########################################################################
########################################################################
# #

View file

@ -142,6 +142,9 @@
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-nextcloud.git
version: v27.0.2-1
name: nextcloud
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-outline.git
version: v0.72.0-0-0
name: outline
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-owncast.git
version: v0.1.0-0
name: owncast

View file

@ -126,6 +126,8 @@
- role: galaxy/owncast
- role: galaxy/outline
- role: galaxy/peertube
- role: galaxy/postgis