구조: admin 을 backend/frontend 로 가른다
admin/ 이 프론트 파일만 널려 있는 폴더였다. :9801 을 띄우는 코드도 solution/backend 안에 얹혀 있어서, 폴더만 봐서는 admin 에 백엔드가 있다는 걸 몰랐다. admin/backend/ main.py · app.py (:9801 진입점. 도메인 코드는 PYTHONPATH 로 solution/backend) admin/frontend/ 운영 화면 패키지 이름도 폴더에 맞췄다: @o2o/front → @o2o/frontend. 이미지 빌드 컨텍스트를 레포 루트로 올렸다 — 진입점(admin/)과 도메인 코드(solution/)가 한 이미지에 들어와야 한다. 루트 .dockerignore 로 프론트·문서·시크릿을 잘라냈다. ★ 실측으로 잡은 것: 패키지명을 바꾸면서 compose 의 `-w @o2o/front` 를 안 고쳐 web 컨테이너가 `No workspaces found` 로 재기동 루프에 빠져 있었다. 주석은 짧게 줄였다. 검증: lint·build 6개 전부 0. 컨테이너 5개 엔드포인트(9800·9801·3000·3002·80) 전부 200. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019uYhHQdssRubirPirrdJJC
This commit is contained in:
1 parent
cabcdeaacc
commit
374a3a4a6e
24 files changed
+110
-111
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import path from 'path';
|
||||
import {defineConfig} from 'vite';
|
||||
|
||||
/**
|
||||
* 내부 운영 화면. 사장님 앱(solution/frontend)과 번들이 갈린다.
|
||||
*
|
||||
* `@` 를 이 앱이 아니라 사장님 앱 src 로 겨눈다 — 내부 화면이 쓰는 API·UI·수집 배선이
|
||||
* 거기 한 벌만 있고 그 파일들끼리도 `@/...` 로 서로를 부른다(자기 src 로 잡으면 TS2307 14건).
|
||||
* 이 앱 고유 파일은 `@admin`. 의존 방향은 admin → solution 한 쪽뿐이다.
|
||||
*/
|
||||
export default defineConfig({
|
||||
plugins: [react(), tailwindcss()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@admin': path.resolve(__dirname, 'src'),
|
||||
'@': path.resolve(__dirname, '../../solution/frontend/src'),
|
||||
// css 별칭이 먼저 와야 한다 — 접두어가 먼저 걸리면 없는 경로로 떨어진다.
|
||||
'@o2o/shared/tokens.css': path.resolve(__dirname, '../../solution/shared/src/styles/tokens.css'),
|
||||
'@o2o/shared/base.css': path.resolve(__dirname, '../../solution/shared/src/styles/base.css'),
|
||||
'@o2o/shared': path.resolve(__dirname, '../../solution/shared/src'),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
watch: {usePolling: true, interval: 300},
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user