* Allow set folder for imported files * Allow passing folder in file/files component; Allow pick folder for file/files/image interfaces. * Added folder system component for picking folders; Move folder picker the field from data to interface (file, files, image). * Add custom folder interface; use props for interfaces file/files/image in upload component * Allow set folder for imported files * Allow passing folder in file/files component; Allow pick folder for file/files/image interfaces. * Added folder system component for picking folders; Move folder picker the field from data to interface (file, files, image). * Add custom folder interface; use props for interfaces file/files/image in upload component * Update after rebase * Add storage_default_folder setting, use folder when deploy file * Fix files options; Add default label option for folder interface. * Fix set folder for file * UX * Add migration for column, undo seed change * Update nomanclature * Make sure file library always submits folder, cleanup setting retrieval * Use indexName on down migrate * Fix import default folder, rename customPresets->folderPreset * Rename interface import * Use undefined as default folder * Remove deprecated lang file * Fix display of folder interface, treat null as value * Move shared composable * Remove unused ref Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
3.9 KiB
Installing with Docker
Directus is published to both DockerHub and
GitHub Packages under directus/directus. To
use the Directus image from DockerHub, run:
docker run -p 8055:8055 directus/directus
Installing Specific Versions
Each released version is available under its own tag (e.g. 9.0.0-rc.85). To use a specific version of Directus, run:
docker run -p 8055:8055 directus/directus:9.0.0-rc.85
::: warning Change In Naming of Docker Tags
Before 9.0.0-rc.84 the Docker tags were prefixed by a "v" - e.g. v9.0.0-rc.83.
:::
Create admin user using docker
The published Docker image will automatically populate the database, and create a user. To configure the email/password for this first user, pass the following env vars:
ADMIN_EMAIL="admin@example.com"
ADMIN_PASSWORD="d1r3ctu5"
Persistence
Containers are ephemeral, and this means that whenever you stop a container, all the data associated with it is going to be removed unless you persist them when creating your container.
Directus image by default will use the following locations for data persistence (note that these can be changed through environment variables)
/directus/uploadsfor uploads/directus/database(only when using SQLite and not configured to a different folder)/directus/extensionsfor extension loadings
Docker Compose
When using Docker compose, you can use the following setup to get you started - make sure to change all sensitive values
(SECRET, DB_PASSWORD, ...) in production:
version: '3'
services:
database:
container_name: database
image: postgres:12
volumes:
- ./data/database:/var/lib/postgresql/data
networks:
- directus
environment:
POSTGRES_USER: 'directus'
POSTGRES_PASSWORD: 'directus'
POSTGRES_DB: 'directus'
cache:
container_name: cache
image: redis:6
networks:
- directus
directus:
container_name: directus
image: directus/directus:latest
ports:
- 8055:8055
volumes:
# By default, uploads are stored in /directus/uploads
# Always make sure your volumes matches the storage root when using
# local driver
- ./uploads:/directus/uploads
# Make sure to also mount the volume when using SQLite
# - ./database:/directus/database
# If you want to load extensions from the host
# - ./extensions:/directus/extensions
networks:
- directus
depends_on:
- cache
- database
environment:
KEY: '255d861b-5ea1-5996-9aa3-922530ec40b1'
SECRET: '6116487b-cda1-52c2-b5b5-c8022c45e263'
DB_CLIENT: 'pg'
DB_HOST: 'database'
DB_PORT: '5432'
DB_DATABASE: 'directus'
DB_USER: 'directus'
DB_PASSWORD: 'directus'
CACHE_ENABLED: 'true'
CACHE_STORE: 'redis'
CACHE_REDIS: 'redis://cache:6379'
ADMIN_EMAIL: 'admin@example.com'
ADMIN_PASSWORD: 'd1r3ctu5'
networks:
directus:
Supported Databases
The Directus Docker Image contains all optional dependencies supported in the API. This means the Docker image can be used with most of the supported databases and storage adapters without having to create a custom image.
::: warning OracleDB
OracleDB's Node client (node-oracledb) requires a couple more native dependencies, and specific configurations in
order to run. The official Directus Docker image does not include these dependencies. See
https://blogs.oracle.com/opal/dockerfiles-for-node-oracledb-are-easy-and-simple
for more information on what to include for OracleDB.
:::