Files
sriphat-dataplatform/CLAUDE.md
jigoong a587be08bd feat: MinIO integration — bucket finance, API service upload, Nginx routing
- 01-infra/nginx-configs: add MinIO /minio/ and /minio-console/ location blocks
  (port 9000 S3 API, port 9001 Console UI, path stripping via rewrite)
- 03-apiservice: integrate MinIO minio-python SDK for file upload
  - requirements.txt: add minio==7.2.11
  - app/core/config.py: add MINIO_ENDPOINT, ACCESS_KEY, SECRET_KEY, BUCKET_FINANCE, USE_SSL
  - app/services/minio_client.py: new — upload_file(), get_presigned_url(), delete_file()
  - app/routes/pages.py: replace local /data/uploads/ write with MinIO upload to finance bucket
  - docker-compose.yml: pass MinIO env vars to container
  - .env.example: document MinIO vars
- 07-minio/.env.example: add MINIO_SVC_ACCESS_KEY/SECRET_KEY section
- 07-minio/README.md: add Python minio SDK and Airflow DAG usage guide
- CLAUDE.md: project context (servers, SSH, paths, service distribution)
- document-obsidiant/: initial Obsidian docs for all services
2026-05-20 17:42:39 +07:00

2.0 KiB

Sriphat Data Platform — Claude Context

Project Paths

Environment Path
Local (WSL2) /mnt/e/git3/sriphat-dataplatform
Server .8 /home/bdadmin/sriphat-dataplatform
Server .9 /home/bdadmin/sriphat-dataplatform (เฉพาะ folders ของ service ที่รันบนเครื่องนี้)
Windows E:\git3\sriphat-dataplatform

Remote Hosts (WSL2 SSH)

Server IP SSH Script
Server 1 192.168.100.8 ~/key/ssh_sriphat_8.sh
Server 2 192.168.100.9 ~/key/ssh_sriphat_9.sh

Service Distribution

Server 1 — 192.168.100.8 (folders ทั้งหมด)

00-network/       # Docker network setup
01-infra/         # Nginx, Keycloak, PostgreSQL, Redis, Dozzle
02-supabase/      # Supabase full stack (13 containers)
03-apiservice/    # Custom FastAPI service
06-analytics/     # Apache Superset

Server 2 — 192.168.100.9 (เฉพาะ folders ของ service ที่ใช้บนเครื่องนี้)

05-airflow/       # Apache Airflow (CeleryExecutor)
07-minio/         # MinIO Object Storage

หมายเหตุ: OpenMetadata อยู่บน server .9 แต่ไม่อยู่ใน repo นี้

Global Environment File

  • Local dev: .env.global (root of project)
  • Server: /home/bdadmin/sriphat-dataplatform/.env.global
  • ไฟล์นี้อยู่ใน .gitignore — ต้องสร้างและ sync เองบนแต่ละเครื่อง

Docker Network

ทุก service ใช้ network ร่วม ต้องสร้างก่อนรัน:

docker network create shared_data_network

Daily Log Convention

  • Path: _daily-log/YYYY-MM-DD-sriphat-dataplatform.md
  • Folder _daily-log/ อยู่ใน .gitignore
  • ดู convention ที่: _daily-log/ (ถ้ามี README) หรือจาก BDA standard