Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker compose minio setup issues #10858

Closed
3 tasks done
OnigiriJack opened this issue Jan 5, 2022 · 0 comments
Closed
3 tasks done

Docker compose minio setup issues #10858

OnigiriJack opened this issue Jan 5, 2022 · 0 comments

Comments

@OnigiriJack
Copy link

Preflight Checklist

Describe the Bug

Currently, I am trying to create a local S3 bucket setup with minio using docker compose.

When trying to upload a photo I am seeing the following error:

UnknownEndpoint: Inaccessible host: my_bucket.minio' at port undefined'. This service may not be available in the 'us-east-1' region.

It seems that directus is not accessing the correct domain for Minio.

To Reproduce

Using the following docker compose configuration run docker compose up and try to upload a profile picture for the admin user.

version: '3'

services:
  database:
    container_name: database
    image: postgis/postgis:13-master
    volumes:
      - ./data/database:/var/lib/postgresql/data
    networks:
      - directus
    environment:
      POSTGRES_USER: 'directus'
      POSTGRES_PASSWORD: 'directus'
      POSTGRES_DB: 'directus'
    ports:
      - "5433:5432"

  cache:
    container_name: cache
    image: redis:6
    networks:
      - directus

  minio:
    image: quay.io/minio/minio:RELEASE.2022-01-04T07-41-07Z
    environment:
      MINIO_ROOT_USER: 'minio'
      MINIO_ROOT_PASSWORD: 'minio123'
    command: server /data --console-address ":9001"
    ports:
      - 9000:9000
      - 9001:9001
    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
    command: >
      sh -c "
        npm install directus-extension-editorjs
        npx directus bootstrap && npx directus start
        npm ls
      "
    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'

      STORAGE_LOCATIONS: s3
      STORAGE_S3_DRIVER: s3
      STORAGE_S3_KEY: 'minio'
      STORAGE_S3_SECRET: 'minio123'
      STORAGE_S3_BUCKET: 'my_bucket'
      STORAGE_S3_ENDPOINT: 'http://minio:9000'

      # Make sure to set this in production
      # (see https://docs.directus.io/reference/environment-variables/#general)
      # PUBLIC_URL: 'https://directus.example.com'

networks:
  directus:

Errors Shown

The following error is displayed in the directus container:

UnknownEndpoint: Inaccessible host: my_bucket.minio' at port `undefined'. This service may not be available in the 'us-east-1' region.

The following message is displayed in the admin UI:

Screen Shot 2022-01-05 at 18 01 08

`

What version of Directus are you using?

9.3.0

What version of Node.js are you using?

From latest directus image

What database are you using?

Postgres

What browser are you using?

Chrome

What operating system are you using?

macOS

How are you deploying Directus?

locally with docker compose

@directus directus locked and limited conversation to collaborators Jan 5, 2022
@azrikahar azrikahar converted this issue into discussion #10860 Jan 5, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant