Files
directus/README.md

78 lines
2.6 KiB
Markdown

# directus
> Directus is an open-source headless CMS & API for managing agnostic content.
<!-- metadata -->
* **Maintainer**: [@val](https://git.coopcloud.tech/val)
* **Status**: `testing`
* **Category**: Apps
* **Image**: [`directus`](https://hub.docker.com/r/directus), 4, upstream
* **Healthcheck**: Yes
* **Backups**: Yes
* **Email**: Yes
* **Tests**: No
* **SSO**: Yes
<!-- endmetadata -->
## Quick start
* `abra app new directus`
* `abra app secret generate <app-name> --all`
* `abra app config <app-name>`
* `abra app deploy <app-name>`
For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).
## Additional configs
### smtp
By default `sendmail` is configured. To use SMTP uncomment the respective section in your .env-file and insert the smtp-secret:
* `abra app secret insert <app-name> smtp_password v1 <your-smtp-password>`
By this you make usage of [compose.smtp.yml](compose.smtp.yml)
### sso (oidc)
The config of one oidc-provider is prepared. Just uncomment an fill in the respective part in .env-file. By this you make usage of [compose.oidc.yml](compose.oidc.yml). If you need further providers, consider [adding a custom compose-file](https://docs.coopcloud.tech/operators/handbook/#how-can-i-modifyoverride-the-composeyml-file) containing the necessary env-vars as indicated in the directus' docs.
### using the directus' cli for templates
In [abra.sh](abra.sh) you find some commands you can run with `abra app cmd` for usage of directus' cli (e.g.) for exporting and importing a schema / template / data ...
### setting custom .env-vars / secrets
Automation in directus is a mighty tool to customize your CMS. If you need to pass a custom env-var or secret, you can do so by [adding a custom compose-file](https://docs.coopcloud.tech/operators/handbook/#how-can-i-modifyoverride-the-composeyml-file).
This is a working example. Make sure you add all your env-vars, that you want to be able to access in flows to the comma separated env-var `FLOWS_ENV_ALLOW_LIST` like explained [here](https://directus.io/docs/configuration/flows).
`directus.compose.customenv.yml`
```
services:
app:
environment:
FLOWS_ENV_ALLOW_LIST: "API_USER,API_TOKEN"
API_USER: "MyApiUser"
API_TOKEN_FILE: /run/secrets/api_token
secrets:
- api_token
secrets:
api_token:
name: ${STACK_NAME}_oidc_secret_${SECRET_API_TOKEN_VERSION}
external: true
```
in your `env-file` you would add:
```
# custom secrets
COMPOSE_FILE="compose.yml:../../servers/<yourserver>/directus.compose.customenv.yml"
SECRET_API_TOKEN_VERSION=v1
```
and then redeploy: `abra app deploy -f <app-name>`