From 41aa77e45dbe77321d82fbfbed01ff58eb3335e6 Mon Sep 17 00:00:00 2001 From: donpat1to Date: Sat, 25 Oct 2025 13:07:25 +0200 Subject: [PATCH] fixed unreachable cache dir --- Dockerfile | 20 ++++++++++++++------ frontend/src/App.test.tsx | 9 --------- frontend/vite.config.ts | 9 ++++++++- 3 files changed, 22 insertions(+), 16 deletions(-) delete mode 100644 frontend/src/App.test.tsx diff --git a/Dockerfile b/Dockerfile index d791e6d..9cd0fcf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,18 +10,26 @@ RUN apt-get update && apt-get install -y python3 python3-pip build-essential \ # Create symlink so python3 is callable as python RUN ln -sf /usr/bin/python3 /usr/bin/python -# Copy backend files -COPY backend/package*.json ./ -COPY backend/tsconfig.json ./ +# Copy root package files +COPY package*.json ./ +COPY tsconfig.base.json ./ + +# Copy workspace package files +COPY backend/package*.json ./backend/ +COPY frontend/package*.json ./frontend/ # Install backend dependencies RUN npm ci -# Copy backend source -COPY backend/src/ ./src/ +# Copy source code +COPY backend/ ./backend/ +COPY frontend/ ./frontend/ # Build backend -RUN npm run build +RUN npm run build --workspace=backend + +# Build frontend +RUN npm run build --workspace=frontend # Copy database files manually RUN cp -r src/database/ dist/database/ diff --git a/frontend/src/App.test.tsx b/frontend/src/App.test.tsx deleted file mode 100644 index 2a68616..0000000 --- a/frontend/src/App.test.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import { render, screen } from '@testing-library/react'; -import App from './App'; - -test('renders learn react link', () => { - render(); - const linkElement = screen.getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -}); diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 70fa8ac..bc4cbd7 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -8,7 +8,14 @@ export default defineConfig({ server: { port: 3003, host: true, - open: true + open: true, + proxy: { + '/api': { + target: 'http://localhost:3002', + changeOrigin: true, + secure: false, + } + } }, build: { outDir: 'dist',