9 Commits

Author SHA1 Message Date
ae61e9fff6 chore(release): 2.0.4 2023-02-03 14:48:01 +01:00
7c533baa05 fix: Change db update command. 2023-02-03 14:47:44 +01:00
02eede7e42 chore(release): 2.0.3 2022-12-12 20:11:54 +01:00
ab5a9b3df6 chore: Add funding. 2022-12-12 20:11:46 +01:00
3a413d8e7f chore(release): 2.0.2 2022-12-11 21:56:57 +01:00
f17ee9a9cc fix(docs): Update role documentation. 2022-12-11 21:56:50 +01:00
b7fd2cff45 fix: Remove superfluous port declaration. 2022-12-11 21:56:33 +01:00
b4f726def5 chore(release): 2.0.1 2022-12-11 02:18:45 +01:00
83d3e45c05 fix: Fix template and rights. 2022-12-11 02:18:36 +01:00
7 changed files with 153 additions and 27 deletions

2
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,2 @@
github: equinoxel
patreon: laurivan

View File

@@ -2,6 +2,30 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [2.0.4](https://git.laurivan.com/Dev/ansible-role-outline-wiki/compare/v2.0.3...v2.0.4) (2023-02-03)
### Bug Fixes
* Change db update command. ([7c533ba](https://git.laurivan.com/Dev/ansible-role-outline-wiki/commit/7c533baa05bd6af418895a627303039081aa00ff))
### [2.0.3](https://git.laurivan.com/Dev/ansible-role-outline-wiki/compare/v2.0.2...v2.0.3) (2022-12-12)
### [2.0.2](https://git.laurivan.com/Dev/ansible-role-outline-wiki/compare/v2.0.1...v2.0.2) (2022-12-11)
### Bug Fixes
* **docs:** Update role documentation. ([f17ee9a](https://git.laurivan.com/Dev/ansible-role-outline-wiki/commit/f17ee9a9cc7ccb15f0196a7dbecf83e0b1c53bdf))
* Remove superfluous port declaration. ([b7fd2cf](https://git.laurivan.com/Dev/ansible-role-outline-wiki/commit/b7fd2cff4539b97dfd3b70e1d1d26138ed648dd2))
### [2.0.1](https://git.laurivan.com/Dev/ansible-role-outline-wiki/compare/v2.0.0...v2.0.1) (2022-12-11)
### Bug Fixes
* Fix template and rights. ([83d3e45](https://git.laurivan.com/Dev/ansible-role-outline-wiki/commit/83d3e45c05c096506430fd9e2568787c8a793a25))
## [2.0.0](https://git.laurivan.com/Dev/ansible-role-outline-wiki/compare/v1.0.0...v2.0.0) (2022-12-10)

127
README.md
View File

@@ -10,54 +10,126 @@ None
All variables are listed below (see also `defaults/main.yml`).
```yml
# defaults file for outline
### Outline Core Variables
Outline requires a couple of secrets for data encryption:
```yml
outline_secret_key: 'changeme'
outline_utils_secret: 'changeme'
```
You also need to specify the deployment type. Usually it's `production`
outline_setup_path: '~/outline'
```yml
outline_deployment: ''
```
outline_port: 3000
outline_url: "http://localhost:{{ outline_port }}"
outline_force_https: "false"
outline_enable_updates: "false"
outline_cdn_url:
You also need to define how you access outline:
outline_debug: "cache,presenters,events,emails,mailer,utils,multiplayer,server,services"
- `outline_port` is the port mapping in Docker. Outline runs at port 3000, which is alos the default
- `outline_url` is the public URL where we see Outline. If you use reverse proxy mapping, put the URL of the reverse proxy (in my case *[this one](https://wiki.home.laurivan.com)*).
- `outline_force_https` will run with HTTPS if true. you can define it as *false* If you're behind a proxy or you don't have a certificate. It defaults to `false`.
- `outline_enable_updates` will enable updates if true. Please read [the documentation](https://app.getoutline.com/s/770a97da-13e5-401e-9f8a-37949c19f97e/) for what this implies (e.g. telemetry)
- Define `outline_cdn_url` if you have a CDN. Defaults to *empty*
**Note**: `outline_url` will define the authentication redirect url for e.g. authentik
You can define which debug messages to be logged via `outline_debug`.
### Storage
Following values are defined for the docker-compose:
```yml
outline_volume_base: "/mnt/outline"
outline_setup_path: '{{ outline_volume_base }}/config'
outline_volume_redis: "{{ outline_volume_base }}/redis"
outline_volume_db: "{{ outline_volume_base }}/db"
outline_volume_s3: "{{ outline_volume_base }}/s3"
```
Please note that `outline_volume_db` and `outline_volume_s3` are actually created only if local posstgres and fake_s3 containers are created by configuration below.
You can specify a logo too via `outline_team_logo_url`. By default this is empty.
You can also change the default language via `outline_language`. The role defaults the language to *en_US*.
### Authentication
Outline authentication can happen via:
- OIDC
- Google authentication
- Slack
You need to define at least one of them.
#### OIDC
OIDC parameters are
```yml
oidc_client_id:
oidc_client_secret:
oidc_auth_uri:
oidc_token_uri:
oidc_userinfo_uri:
```
Your authentication app should provide you all the above. I use something along the lines:
```yml
oidc_client_id: "changeme"
oidc_client_secret: "changeme"
oidc_auth_uri: "https://sso.laurivan.com/application/o/authorize/"
oidc_token_uri: "https://sso.laurivan.com/application/o/token/"
oidc_userinfo_uri: "https://sso.laurivan.com/application/o/userinfo/"
oidc_username_claim: "preferred_username"
```
**Note**: you will probably need to provide the redirect URL to the authentication application. For Authentik, you can find it in the **Provider** for the specific application.
#### Google ID
You need to define:
```yml
outline_google_client_id:
outline_google_client_secret:
```
#### Slack
You need to define
```yml
outline_slack_client_id:
outline_slack_client_secret:
```
# If the db_host is not "postgres", then we assume the
# db is external and not spin up the docker container
### Database
You need to assign a database to Outline. This role allows you to launch Postgres in a container via:
```yml
outline_db_schema: "postgres"
outline_db_host: "postgres"
outline_db_port: "5432"
outline_db_user: "postgres"
outline_db_password: "changeme"
outline_db: "outline"
```
# By default, PostgreSQL is not secured. If you have a secure
# database instance, replace the content below with "enable".
outline_db_ssl: "disable"
If the db_host is not "postgres", then we assume the db is external and not spin up the docker container.
# Spin up the fake S3 only if "fake_s3" is true
By default, PostgreSQL is not secured. If you have a secure database instance, set the `outline_db_ssl` variable to "enable".
### S3
We define the following variables:
```yml
outline_fake_s3: true
outline_fake_s3_port: 4569
outline_aws_access_key_id:
@@ -68,17 +140,34 @@ outline_aws_s3_upload_bucket_name: outline-bucket
outline_aws_s3_upload_max_size: "26214400"
outline_aws_s3_force_path_style: "true"
outline_aws_s3_acl: "private"
```
You need S3 (or S3-like) storage for e.g. uploaded files. By default, the role spins up the fake S3 only if `fake_s3` variable is true.
I use [MinIO](https://min.io/) with something like:
```yml
outline_fake_s3: ""
outline_aws_access_key_id: "change me"
outline_aws_secret_access_key: "change me"
outline_aws_region: "my-rack"
outline_aws_s3_upload_bucket_url: "http://minio,example.com:9000"
outline_aws_s3_upload_max_size: "26214400"
outline_aws_s3_force_path_style: "true"
outline_aws_s3_acl: "private"
```
### Email
Outline can send notification emails if you set up the SMTP variables:
```yml
outline_smtp_host:
outline_smtp_port:
outline_smtp_username:
outline_smtp_password:
outline_smtp_from_email:
outline_smtp_reply_email:
outline_team_logo_url:
outline_language: 'en_US'
```
## Dependencies

View File

@@ -7,7 +7,7 @@ outline_utils_secret: 'changeme'
outline_deployment: ''
outline_port: 3000
outline_url: "http://localhost:{{ outline_port }}"
outline_url: "http://localhost:{{ outline_public_port }}"
outline_force_https: "false"
outline_enable_updates: "false"
outline_cdn_url:

View File

@@ -23,9 +23,19 @@
with_items:
- "{{ outline_setup_path | expanduser | realpath }}"
- "{{ outline_volume_redis | expanduser | realpath }}"
- "{{ outline_volume_db | expanduser | realpath }}"
- "{{ outline_volume_s3 | expanduser | realpath }}"
tags:
- configuration
become: true
- name: Set up the database directory.
ansible.builtin.file:
state: directory
path: "{{ item }}"
mode: "0755"
owner: 70
with_items:
- "{{ outline_volume_db | expanduser | realpath }}"
tags:
- configuration
become: true

View File

@@ -58,8 +58,8 @@ services:
outline:
image: outlinewiki/outline:latest
command: sh -c "yarn start"
# command: sh -c "yarn sequelize:migrate --env production-ssl-disabled && yarn start"
#command: sh -c "yarn start"
command: sh -c "yarn db:migrate --env production-ssl-disabled && yarn start"
env_file:
- "{{ outline_setup_path | expanduser | realpath }}/env.outline.conf"
- "{{ outline_setup_path | expanduser | realpath }}/env.oidc.conf"
@@ -79,4 +79,3 @@ services:
networks:
outline: {}

View File

@@ -8,7 +8,11 @@ UTILS_SECRET={{ outline_utils_secret }}
DEPLOYMENT={{ outline_deployment }}
{% if outline_db_schema == 'postgres' and outline_db_host == 'postgres' %}
DATABASE_URL=postgres://{{ outline_db_user }}:{{ outline_db_password }}@postgres:5432/{{ outline_db }}
{% else %}
DATABASE_URL={{ outline_db_schema }}://{{ outline_db_user }}:{{ outline_db_password }}@{{outline_db_host}}:{{ outline_db_port }}/{{ outline_db }}
{% endif %}
DATABASE_URL_TEST={{ outline_db_schema }}://{{ outline_db_user }}:{{ outline_db_password }}@{{outline_db_host}}:{{ outline_db_port }}/{{ outline_db }}_test
REDIS_URL=redis://redis:6379
@@ -16,6 +20,7 @@ REDIS_URL=redis://redis:6379
URL={{ outline_url }}
PORT=3000
# Optional. If using a Cloudfront distribution or similar the origin server
# should be set to the same as URL.
CDN_URL={{ outline_cdn_url }}
@@ -89,6 +94,3 @@ DEFAULT_LANGUAGE={{ outline_language }}
{% if outline_db_ssl %}
PGSSLMODE={{ outline_db_ssl }}
{% endif %}