Files
writefreely/README.md

88 lines
2.7 KiB
Markdown

# writefreely
> An open source platform for building a writing space on the web.
<!-- metadata -->
* **Category**: Apps
* **Status**: 2, beta
* **Image**: [`writefreely`](https://git.coopcloud.tech/coop-cloud-chaos-patchs/docker-writefreely), 1, Co-op Cloud custom image
* **Healthcheck**: 3
* **Backups**: 1
* **Email**: 3
* **Tests**: No
* **SSO**: 1
<!-- endmetadata -->
## Basic usage
1. Set up Docker Swarm and `abra`
2. Deploy `coop-cloud/traefik`
3. `abra app new writefreely`
4. `abra app config <domain>` - be sure to change `<domain>` to something that resolves to
your coop-cloud server.
- For more info about the config options, see the [writefreely docs](https://writefreely.org/docs/main/admin/config).
5. `abra app deploy <domain>`
6. Once it's running, if you are not using SSO, set up a local admin user by running this command:
```
abra app run <domain> app -- writefreely -c /usr/share/writefreely/config.ini user create --admin <some-username>:<some-password>
```
## Keycloak setup
For the **OAUTH_HOST** config, it uses this format: `https://keycloak.example.com/auth/realms/<your realm>/protocol/openid-connect`.
To set the client secret: `abra app secret insert <domain> oauth_client_secret v1`
## Authentik setup
If you've set up Authentik for SSO, you can integrate it into Writefreely by running the following steps:
1. In the Authentik app, uncomment the Writefreely configuration to enable the associated blueprint:
```
COMPOSE_FILE="$COMPOSE_FILE:compose.writefreely.yml"
WRITEFREELY_DOMAIN=writefreely.example.com
SECRET_WRITEFREELY_ID_VERSION=v1
SECRET_WRITEFREELY_SECRET_VERSION=v1
APP_ICONS="writefreely:~/.abra/recipes/authentik/icons/writefreely.png"
WRITEFREELY_APPGROUP="$GROUP_DOCUMENTATION"
```
2. Also in Authentik, generate the client id/secret pair.
```
abra app secret generate <authentik_app_name> writefreely_id v1
```
```
abra app secret generate <authentik_app_name> writefreely_secret v1
```
3. Uncomment and properly set the configs for Authentik in `abra app config <domain>`.
4. Set the client id/secret that were generated previously, by running:
```
abra app secret insert <domain> oauth_client_id v1
```
```
abra app secret insert <domain> oauth_client_secret v1
```
## MariaDB
By default, this recipe uses sqlite. If you wish to use MariaDB instead:
1. When creating the app, you need the `--secrets` flag: `abra app new writefreely --secrets`
2. Run `abra app config <domain>` and follow the instructions to uncomment four lines.
3. `abra app deploy <domain>`
## Acknowledgements
Thanks to [@knoflook](https://git.coopcloud.tech/knoflook) for packaging work :heart: