8000 docs: setup minio for local dev by owlas · Pull Request #14760 · lightdash/lightdash · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

docs: setup minio for local dev #14760

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,10 @@ HEADLESS_BROWSER_PORT=3000
#LANGCHAIN_PROJECT=

#POSTHOG_FE_API_HOST=
#POSTHOG_BE_API_HOST=
#POSTHOG_BE_API_HOST=

S3_ENDPOINT=http://localhost:9000
RESULTS_CACHE_S3_BUCKET=lightdash
RESULTS_CACHE_S3_REGION=us-east-1
RESULTS_CACHE_S3_ACCESS_KEY=minioadmin
RESULTS_CACHE_S3_SECRET_KEY=minioadmin
24 changes: 24 additions & 0 deletions .github/CONTRIBUTING.md
8821
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ To setup Development Environment without Docker you need following pre-requisite
- pnpm
- postgres >= 12
- dbt 1.4.x or 1.5.x
- MinIO

eg. on MacOS you can follow this instructions:

Expand Down Expand Up @@ -320,6 +321,16 @@ brew services start postgresql@14
# export PG_CONFIG=/opt/homebrew/opt/postgresql@14/bin/pg_config
git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git && cd pgvector && make && sudo make install && cd ..

# 5 Install MinIO
brew install minio/stable/minio
mkdir ./data # create data directory - clean this regularly
minio server ./data # start server

# Install MinIO client
brew install minio/stable/mc
mc alias set local http://127.0.0.1:9000 minioadmin minioadmin # setup alias to data directory called local
mc mb local/lightdash # create a bucket in local

# 5 Install dbt using pip
Comment on lines +324 to 334
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The step numbering in the documentation has a duplicate - both MinIO and dbt installation sections are labeled as step 5. To maintain consistent numbering throughout the guide, please update the dbt installation section to # 6 Install dbt using pip.

Suggested change
# 5 Install MinIO
brew install minio/stable/minio
mkdir ./data # create data directory - clean this regularly
minio server ./data # start server
# Install MinIO client
brew install minio/stable/mc
mc alias set local http://127.0.0.1:9000 minioadmin minioadmin # setup alias to data directory called local
mc mb local/lightdash # create a bucket in local
# 5 Install dbt using pip
# 5 Install MinIO
brew install minio/stable/minio
mkdir ./data # create data directory - clean this regularly
minio server ./data # start server
# Install MinIO client
brew install minio/stable/mc
mc alias set local http://127.0.0.1:9000 minioadmin minioadmin # setup alias to data directory called local
mc mb local/lightdash # create a bucket in local
# 6 Install dbt using pip

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

# Detailed installation guide available here: https://docs.getdbt.com/docs/core/pip-install
# Create python virtual env
Expand Down Expand Up @@ -369,6 +380,19 @@ Password: demo_password!

> ⚠️ you can add env variables to your system and ignore running `pnpm load:env` before each command

#### Clearing disk space

Lightdash writes results + exports to your machine if you're using MinIO. Make sure to clear the ./data
directory frequently.

You can do this by just deleting everything in the bucket:

```shell
rm ./data/lightdash/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing files directly from the filesystem with rm ./data/lightdash/* while MinIO is running can lead to inconsistencies between MinIO's internal state and the actual filesystem. For safer bucket management, consider using the MinIO client instead:

mc rm --recursive --force local/lightdash/

This ensures MinIO properly tracks all deletions and maintains consistency between its metadata and the underlying storage.

Suggested change
rm ./data/lightdash/*
mc rm --recursive --force local/lightdash/

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

```



#### How to run unit tests

```shell
Expand Down
0