Merge branch 'main' into aggregation

This commit is contained in:
rijkvanzanten
2021-06-07 09:31:44 -04:00
142 changed files with 9129 additions and 5252 deletions

View File

@@ -23,6 +23,7 @@ These options are only recommended for developers familiar with these services a
While Directus is always completely free, you will likely need to pay for these services.
- [Generic Ubuntu](/guides/installation/ubuntu)
- [Internet Information Services (IIS)](/guides/installation/iis)
- [Amazon AWS](/guides/installation/aws)
- [DigitalOcean App Platform](/guides/installation/digitalocean-app-platform)
@@ -32,9 +33,10 @@ If you would like to completely avoid the manual installation process, the follo
handle the heavy-lifting for you. While Directus is always completely free, you will likely need to pay for these
services.
- [Directus DigitalOcean App](https://marketplace.digitalocean.com/apps/directus?action=deploy&refcode=4c0b6062c16e)
- [Directus Platform.sh App](https://console.platform.sh/projects/create-project?template=https%3A%2F%2Fraw.githubusercontent.com%2Fplatformsh%2Ftemplate-builder%2Fmaster%2Ftemplates%2Fdirectus%2F.platform.template.yaml)
- [Heroku App](https://heroku.com/deploy?template=https://github.com/directus-community/heroku-template)
- [DigitalOcean](https://marketplace.digitalocean.com/apps/directus?action=deploy&refcode=4c0b6062c16e)
- [Heroku](https://heroku.com/deploy?template=https://github.com/directus-community/heroku-template)
- [Platform.sh](https://console.platform.sh/projects/create-project?template=https%3A%2F%2Fraw.githubusercontent.com%2Fplatformsh%2Ftemplate-builder%2Fmaster%2Ftemplates%2Fdirectus%2F.platform.template.yaml)
- [Zeet](https://deploy.zeet.co/?url=https://github.com/directus-community/heroku-template)
## Directus Cloud

View File

@@ -16,10 +16,10 @@ Node.js. If you are looking for the previous **[Directus 8](https://github.com/d
**Directus is an Open Data Platform for managing the content of any SQL database. It provides a powerful API layer for
developers and an intuitive App for non-technical users.** Written entirely in JavaScript (primarily
[Node.js](https://nodejs.dev) and [Vue.js](https://vuejs.org)), Directus is completely open-source, modular, and
extensible, allowing it to be fully tailored to your exact project needs.
extensible, allowing it to be fully tailored to the requirements of any project.
Our platform can be used as a headless CMS for managing digital experiences, a database client for democratizing data,
or as a standalone back-office web app for CRM, inventory, business intelligence, project management, etc.
The platform can be used as a headless content management, or for democratizing data (customer, inventory, business,
project, etc) across an organization.
::: tip What's in a name?
@@ -28,16 +28,45 @@ lines_. The broadest goal of our platform is to present data in a simple, orderl
:::
## What makes it unique?
## Database Mirroring
**Directus dynamically generates custom API endpoints based on your SQL database's schema in real-time — something we
call "Database Mirroring".** Whether you install fresh or on top of an existing database, you always maintain end-to-end
control over your actual database, including: tables, columns, datatypes, default values, indexes, relationships, etc.
**What makes Directus so unique is that it dynamically generates custom API endpoints based on your SQL database's
schema in real-time — something we call "[Database Mirroring](/concepts/databases/#database-mirroring)".** Whether you
install fresh or on top of an existing database, you always maintain end-to-end control over your actual database,
including: tables, columns, datatypes, default values, indexes, relationships, etc.
Below is an overview to how Directus mirrors the database, and our non-technical naming convention.
- **[Project](/concepts/projects/)** — A Database (also includes asset storage and the config file)
- **[Collection](/concepts/collections/)** — A Database Table
- **[Fields](/concepts/fields/)** — A Database Column
- **[Item](/concepts/items/)** — A Database Record/Row
- **[Relationships](/concepts/relationships/)** — A Database Relationship, including additional non-standard types
- **[Type](/concepts/types/)** — A Database Data Type, including additional non-standard types
- **[Users](/concepts/users/)** — A Directus User (App or API), not to be confused with a Database User
Perhaps one of the biggest advantages of _Database Mirroring_ is that you have direct access to your pure and unaltered
data. That means you have the option to bypass the Directus middleware (API, SDK, App) and connect to your data with
proper SQL queries. This effectively removes all bottlenecks, latency overhead, and proprietary access limitations.
## Modular & Extensible
What makes Directus so flexible is that it has been designed from the ground up with complete extensibility, helping
avoid a feature ceiling. In addition to offering our software's codebase as open-source, we've included the following
extension types in the platform's App and API.
- **[Modules](/concepts/modules/)** — (App) The highest and broadest level of organization within the App
- **[Layouts](/concepts/layouts/)** — (App) How you browse, view or interact with a set of Items in a Collection
- **[Interfaces](/concepts/interfaces/)** — (App) How you view or interact with a field and its value
- **[Displays](/concepts/displays/)** — (App) A small inline preview of a field's value
- **[Panes](#)** — (App) A way to view dashboard data within the Insights Module
- **[Styles](/guides/styles/)** — (App) Whitelabeling through App Themes and CSS Overrides
- **[Endpoints](/guides/api-endpoints/)** — (API) Custom registered API endpoints
- **[Hooks](/guides/api-hooks/)** — (API) Event and interval hooks for triggering custom logic
- **[Email Templates](/guides/email-templates/)** — (API) Custom structure and formatting for emails
## Core Principles
Directus is a simple solution for complex problems, with a data-first approach guided by the following core principles:
- **Pure** — There is no predefined model or proprietary rules for your schema, and all system settings are stored

View File

@@ -0,0 +1,59 @@
# IIS (Internet Information Services)
Deploying directus to IIS will require [iisnode](https://github.com/Azure/iisnode), an entrypoint file, and some
specific web.config configurations.
# iisnode
iisnode can be downloaded from the [azure/iisnode releases](https://github.com/Azure/iisnode/releases) page.
## Entrypoint
iisnode acts as a reverse proxy, and simply forwards requests to files based on any rewrite rules and the files
available. Since iisnode simply pipes requests to files, running the directus CLI directly won't work. To get around
this, use an entrypoint script like the `index.js` below.
```js
var { default: start } = require('directus/dist/start');
start();
```
## web.config
With an entrypoint created, add a web.config to the root of the project. The following web.config is a simple example of
running directus with iisnode
```xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="iisnode" path="index.js" verb="*" modules="iisnode" />
</handlers>
<iisnode node_env="%node_env%" loggingEnabled="true" enableXFF="true" />
<rewrite>
<rules>
<rule name="root">
<match url="*" />
<action type="Rewrite" url="index.js" />
</rule>
</rules>
</rewrite>
</system.webServer>
</location>
</configuration>
```
A few important points regarding this file:
1. The iisnode handler `path` parameter is set to the entrypoint filepath
2. The iisnode handler `verb` parameter is set to handle all verbs (\*)
3. The iisnode `node_env` parameter is bound to the environment variable `node_env`
4. The iisnode `enableXFF` parameter is set to `true`. Since iisnode acts as a reverse proxy, this is required to pass
client ip and other details on to the directus server, which directus modules expect and depend on.
5. the rewrite rule is in place to send all requests made to this site to the entrypoint, ensuring that directus handles
the routing and not IIS
While there are dozens even hundreds of options within IIS, this should help in getting started with Directus on IIS.

View File

@@ -77,7 +77,7 @@ See [Styles > Custom CSS](/guides/styles/#custom-css)
1. Make a copy of the **files within each storage adapter**, and store them in a safe place
2. Make a copy of the **Env file** (`/api/.env`), and store it in a safe place
3. Run the **Backup API Endpoint** (`/backup`) to create a SQL dump of your database
3. Create a database dump
## Migrating a Project
@@ -91,6 +91,14 @@ of Directus.
:::
## Downgrading a Project
Directus can be reverted to an earlier version by going to your terminal, navigating into your project folder and
running `npm install directus@<version>`.
If you ran any database migrations for a newer version, you can revert those by running
`npx directus database migrate:down`
## Deleting a Project
1. Optional: **Backup any local files** stored within the project's root directory

View File

@@ -1,7 +1,7 @@
{
"name": "@directus/docs",
"private": false,
"version": "9.0.0-rc.69",
"version": "9.0.0-rc.73",
"description": "",
"main": "index.json",
"scripts": {
@@ -31,7 +31,7 @@
"gitHead": "24621f3934dc77eb23441331040ed13c676ceffd",
"devDependencies": {
"directory-tree": "^2.2.9",
"fs-extra": "^9.1.0",
"fs-extra": "^10.0.0",
"lodash.get": "^4.4.2",
"micromark": "^2.10.1",
"npm-watch": "^0.9.0",

View File

@@ -48,15 +48,15 @@ All the `DB_POOL_` prefixed options are passed [to `tarn.js`](https://github.com
## Security
| Variable | Description | Default Value |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `KEY` | Unique identifier for the project. | -- |
| `SECRET` | Secret string for the project. | -- |
| `ACCESS_TOKEN_TTL` | The duration that the access token is valid. | 15m |
| `REFRESH_TOKEN_TTL` | The duration that the refresh token is valid, and also how long users stay logged-in to the App. | 7d |
| `REFRESH_TOKEN_COOKIE_DOMAIN` | Which domain to use for the refresh cookie. Useful for development mode. | -- |
| `REFRESH_TOKEN_COOKIE_SECURE` | Whether or not to use a secure cookie for the refresh token in cookie mode. | `false` |
| `REFRESH_TOKEN_COOKIE_SAME_SITE` | Value for `sameSite` in the refresh token cookie when in cookie mode. | `lax` |
| Variable | Description | Default Value |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `KEY` | Unique identifier for the project. | -- |
| `SECRET` | Secret string for the project. | -- |
| `ACCESS_TOKEN_TTL` | The duration that the access token is valid. | 15m |
| `REFRESH_TOKEN_TTL` | The duration that the refresh token is valid, and also how long users stay logged-in to the App. | 7d |
| `REFRESH_TOKEN_COOKIE_DOMAIN` | Which domain to use for the refresh cookie. Useful for development mode. | -- |
| `REFRESH_TOKEN_COOKIE_SECURE` | Whether or not to use a secure cookie for the refresh token in cookie mode. | `false` |
| `REFRESH_TOKEN_COOKIE_SAME_SITE` | Value for `sameSite` in the refresh token cookie when in cookie mode. | `lax` |
| `PASSWORD_RESET_URL_ALLOW_LIST` | List of URLs that can be used [as `reset_url` in /password/request](/reference/api/system/authentication/#request-password-reset) | -- |
| `USER_INVITE_URL_ALLOW_LIST` | List of URLs that can be used [as `invite_url` in /users/invite](/reference/api/system/users/#invite-a-new-user) | -- |