Skip to content

feat: migrate static files from backend to R2#54

Merged
zuhanit merged 3 commits intomasterfrom
feat/migrate-static-to-r2
Mar 8, 2026
Merged

feat: migrate static files from backend to R2#54
zuhanit merged 3 commits intomasterfrom
feat/migrate-static-to-r2

Conversation

@zuhanit
Copy link
Copy Markdown
Owner

@zuhanit zuhanit commented Mar 8, 2026

Summary

  • 백엔드에서 직접 서빙하던 static 파일(anim, terrain)을 Cloudflare R2 버킷으로 이전
  • NEXT_PUBLIC_STATIC_BASE_URL 환경 변수를 통해 R2 URL 설정
  • tileset API 엔드포인트 및 StaticFiles 마운트 제거

Changes

  • Frontend: useImage, useTilesetData, useTileGroup 훅에서 백엔드 API 대신 R2 직접 요청
  • Backend: tileset.py 엔드포인트 삭제, StaticFilesCache/static 마운트 제거
  • Dockerfile: preprocess output 복사 및 /app/static 디렉토리 생성 제거
  • Docs: NEXT_PUBLIC_STATIC_BASE_URL 설정 안내 추가

Test plan

  • 에디터에서 지형(terrain) 렌더링 확인
  • 에디터에서 유닛/스프라이트 이미지 렌더링 확인
  • .env.development, .env.productionNEXT_PUBLIC_STATIC_BASE_URL 설정 확인

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webditor Ready Ready Preview, Comment Mar 8, 2026 2:58am

zuhanit and others added 3 commits March 8, 2026 11:57
Replace backend API calls for static assets (anim, terrain) with direct
requests to NEXT_PUBLIC_STATIC_BASE_URL (R2 bucket).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Delete tileset API endpoints and StaticFiles mount since static assets
are now served directly from R2. Also remove preprocess output copy
from Dockerfile.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@zuhanit zuhanit force-pushed the feat/migrate-static-to-r2 branch from d9a2ded to c89504b Compare March 8, 2026 02:57
@zuhanit zuhanit merged commit 856b692 into master Mar 8, 2026
5 checks passed
@zuhanit zuhanit deleted the feat/migrate-static-to-r2 branch March 8, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant