UI Bakery Asset Storage Configuration Issue with MinIO
Environment:
UI Bakery On-Premise (latest) Docker Swarm Traefik as reverse proxy MinIO as S3 storage Portainer for management
Issue: When trying to upload an image to a component, I'm getting the error:
Asset storage not configured on your instance
What I've tried:
- Configured MinIO with: Separate endpoints for API (s3api.domain.com) and frontend (s3.domain.com) Created bucket with public read access Verified MinIO credentials work correctly Set up storage configuration in UI Bakery with: S3 compatible storage All required environment variables Proper endpoints and credentials
Current Configuration:
Here's my docker-compose file with the storage configuration (sensitive data replaced with placeholders):
version: '3.8'
services:
bakery-gateway:
container_name: gateway
depends_on:
- "bakery-front"
- "workbench-front"
- "bakery-back"
image: cruibakeryonprem.azurecr.io/cloud/gateway:${UI_BAKERY_VERSION:-latest}
restart: always
networks:
- traefik_public
deploy:
mode: replicated
replicas: 1
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik_public"
- "traefik.http.routers.uibakery.rule=Host(`bakery.domain.com`)"
- "traefik.http.routers.uibakery.entrypoints=websecure"
- "traefik.http.routers.uibakery.tls=true"
- "traefik.http.routers.uibakery.tls.certresolver=le"
- "traefik.http.services.uibakery.loadbalancer.server.port=3030"
bakery-front:
container_name: bakery-front
image: cruibakeryonprem.azurecr.io/cloud/bakery-front:${UI_BAKERY_VERSION:-latest}
restart: always
networks:
- traefik_public
deploy:
mode: replicated
replicas: 1
workbench-front:
container_name: workbench-front
image: cruibakeryonprem.azurecr.io/cloud/workbench-front:${UI_BAKERY_VERSION:-latest}
restart: always
networks:
- traefik_public
deploy:
mode: replicated
replicas: 1
datasource:
container_name: datasource
image: cruibakeryonprem.azurecr.io/cloud/datasource:${UI_BAKERY_VERSION:-latest}
restart: always
networks:
- traefik_public
deploy:
mode: replicated
replicas: 1
bakery-back:
container_name: bakery-back
depends_on:
- db
image: cruibakeryonprem.azurecr.io/cloud/bakery-back:${UI_BAKERY_VERSION:-latest}
environment:
- UI_BAKERY_LICENSE_KEY=your_license_key_here
- UI_BAKERY_VERSION=latest
- MYSQL_HOST=db
- MYSQL_PORT=3306
- MYSQL_DATABASE=bakery
- MYSQL_USER=bakery
- MYSQL_PASSWORD=bakery
- POSTGRES_HOST=bakery-db
- POSTGRES_PORT=5432
- POSTGRES_DB=bakery
- POSTGRES_USER=bakery
- POSTGRES_PASSWORD=bakery
- NODE_ENV=production
- API_URL=https://bakery.domain.com
- UI_BAKERY_AI_ENABLED=true
- UI_BAKERY_AI_MODEL=gpt-4
- OPENAI_API_KEY=your_openai_key_here
- UI_BAKERY_ENABLED_FEATURE_FLAGS=chat
- UI_BAKERY_CHAT_API_URL=https://chat2.uibakery.io
- UI_BAKERY_STORAGE_ENABLED=true
- UI_BAKERY_STORAGE_TYPE=s3
- UI_BAKERY_STORAGE_S3_ACCESS_KEY=your_s3_access_key
- UI_BAKERY_STORAGE_S3_SECRET_KEY=your_s3_secret_key
- UI_BAKERY_STORAGE_S3_BUCKET=your_bucket_name
- UI_BAKERY_STORAGE_S3_REGION=us-east-1
- UI_BAKERY_STORAGE_S3_ENDPOINT=https://s3api.domain.com
- UI_BAKERY_STORAGE_S3_FORCE_PATH_STYLE=true
- UI_BAKERY_STORAGE_S3_SSL_ENABLED=true
- UI_BAKERY_STORAGE_PUBLIC_URL=https://s3.domain.com/your_bucket_name
- UI_BAKERY_STORAGE_MAX_FILE_SIZE=10485760
- UI_BAKERY_STORAGE_ALLOWED_FILE_TYPES=image/*,application/pdf
restart: always
networks:
- traefik_public
deploy:
mode: replicated
replicas: 1
automation:
container_name: automation
image: cruibakeryonprem.azurecr.io/cloud/automation:${UI_BAKERY_VERSION:-latest}
restart: always
networks:
- traefik_public
deploy:
mode: replicated
replicas: 1
python-runtime:
container_name: python-runtime
image: cruibakeryonprem.azurecr.io/cloud/python-runtime:${UI_BAKERY_VERSION:-latest}
restart: always
networks:
- traefik_public
deploy:
mode: replicated
replicas: 1
db:
container_name: db
image: mysql:8.0
command: --default-authentication-plugin=mysql_native_password --skip-log-bin
restart: always
cap_add:
- SYS_NICE
environment:
MYSQL_DATABASE: "bakery"
MYSQL_USER: "bakery"
MYSQL_PASSWORD: "bakery"
MYSQL_ROOT_PASSWORD: "root"
volumes:
- my-db:/var/lib/mysql
healthcheck:
test: mysql -h localhost -u bakery --password=bakery -e "select 1";
timeout: 1s
interval: 10s
retries: 10
networks:
- traefik_public
deploy:
mode: replicated
replicas: 1
bakery-db:
image: "postgres:16.1"
container_name: bakery-db
restart: always
environment:
POSTGRES_USER: "bakery"
POSTGRES_PASSWORD: "bakery"
POSTGRES_DB: "bakery"
healthcheck:
test: pg_isready -U bakery
interval: 1s
timeout: 5s
retries: 10
volumes:
- internal-db:/var/lib/postgresql/data
networks:
- traefik_public
deploy:
mode: replicated
replicas: 1
networks:
traefik_public:
external: true
volumes:
my-db:
internal-db:
Logs: When trying to upload, I get this error in bakery-back logs:
Failed to upload to the storage. reason=Asset storage not configured on your instance com.akveo.bakery.storage.exception.StorageNotConfiguredHttpException: null
Questions:
Is there any specific version of UI Bakery that works better with S3 storage? Are there any additional environment variables needed beyond what's in the documentation? Could this be related to the way Docker Swarm handles environment variables? I'm happy to debug this on a call if needed, as this seems to be a critical functionality for our implementation.
Additional Info:
MinIO is working correctly with other applications All services are running and healthy Network connectivity between services is confirmed working