T
Typebot•16mo ago
Alex

Minio self hosting using docker

Hello guys, I am trying to setup minio as the local s3 storage, when I try to upload a file using the file input block, I have this in my browser dev tools POST http://minio:9005/typebot net::ERR_NAME_NOT_RESOLVED my docker-compose file
version: "3.3"

volumes:
db-data:
s3-data:

services:
typebot-db:
image: postgres:13.13-alpine3.19
restart: always
volumes:
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=typebot
- POSTGRES_PASSWORD=typebot

minio:
image: minio/minio
command: server --address ":9005" --console-address ":9001" /data
ports:
- "9005:9005"
- "9001:9001"
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
volumes:
- s3-data:/data

# This service just makes sure a bucket with the right policies is created
createbuckets:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
sleep 10;
/usr/bin/mc config host add minio http://minio:9005 minio minio123;
/usr/bin/mc mb minio/typebot;
/usr/bin/mc anonymous set public minio/typebot;
exit 0; "

typebot-builder:
image: baptistearno/typebot-builder:latest
restart: always
depends_on:
- typebot-db
- minio
ports:
- "8080:3000"
extra_hosts:
- "host.docker.internal:host-gateway"
env_file: .env

typebot-viewer:
image: baptistearno/typebot-viewer:latest
restart: always
ports:
- "8081:3000"
env_file: .env
version: "3.3"

volumes:
db-data:
s3-data:

services:
typebot-db:
image: postgres:13.13-alpine3.19
restart: always
volumes:
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=typebot
- POSTGRES_PASSWORD=typebot

minio:
image: minio/minio
command: server --address ":9005" --console-address ":9001" /data
ports:
- "9005:9005"
- "9001:9001"
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
volumes:
- s3-data:/data

# This service just makes sure a bucket with the right policies is created
createbuckets:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
sleep 10;
/usr/bin/mc config host add minio http://minio:9005 minio minio123;
/usr/bin/mc mb minio/typebot;
/usr/bin/mc anonymous set public minio/typebot;
exit 0; "

typebot-builder:
image: baptistearno/typebot-builder:latest
restart: always
depends_on:
- typebot-db
- minio
ports:
- "8080:3000"
extra_hosts:
- "host.docker.internal:host-gateway"
env_file: .env

typebot-viewer:
image: baptistearno/typebot-viewer:latest
restart: always
ports:
- "8081:3000"
env_file: .env
In my .env i set the s3 variable as:
S3_ACCESS_KEY=minio
S3_SECRET_KEY=minio123
S3_BUCKET=typebot
S3_ENDPOINT=minio
S3_PORT=9005
S3_SSL=false
S3_ACCESS_KEY=minio
S3_SECRET_KEY=minio123
S3_BUCKET=typebot
S3_ENDPOINT=minio
S3_PORT=9005
S3_SSL=false
5 Replies
Baptiste
Baptiste•16mo ago
Your minio instance needs to be publicly available, meaning can be called from any web browser. This is not: http://minio:9005
Alex
AlexOP•16mo ago
if i would like it to be it only access locally, how can i approach this? I have search for awhile now and I have not found solutions to this. I apologise for my inexperience in docker. I can access the minio on my host machine using localhost:9005 but my other services can't access the minio to upload files.
Baptiste
Baptiste•16mo ago
You can't for uploading file, a link to your s3 instance is generated and is consumed on the front-end. The S3 URL should be publicly available.
Alex
AlexOP•16mo ago
ooh got it, thank you for replying and clarifying! have a nice day
Baptiste
Baptiste•16mo ago
My pleasure 👌

Did you find this page helpful?