Skip to content

Directus

Docker Compose File

docker-compose-file

Database Environment Variables

Add following environment variables to the Docker compose file to connect to a mysql database.

yml
    - DB_CLIENT=mysql
    - DB_HOST=
    - DB_PORT=3306
    - DB_DATABASE=
    - DB_USER=
    - DB_PASSWORD=

S3 File Storage Environment Variables

Add following environment variables to the Docker compose file to connect to a Backblaze B2 storage.

yml
    - STORAGE_LOCATIONS=b2
    - STORAGE_B2_DRIVER=s3
    - STORAGE_B2_KEY=
    - STORAGE_B2_SECRET=
    - STORAGE_B2_BUCKET=
    - STORAGE_B2_REGION=eu-central-003
    - STORAGE_B2_ENDPOINT=https://s3.eu-central-003.backblazeb2.com
    - STORAGE_B2_FORCE_PATH_STYLE=true

Retrieve data

Get Collection items

bash
curl -X GET "https://directus-orbitx.jellec.de/items/products?fields=title,image,price"

get-products

Get File

bash
curl -X GET "https://directus-orbitx.jellec.de/assets/98e133f2-10ce-48a0-a8e4-4b2bc444bce4?width=300&format=webp&quality=80"

get-file