nochmal, nun alles docker-zeugs dabei

This commit is contained in:
rxf
2025-11-23 12:28:41 +01:00
parent 6727fe91d9
commit 268b4dee18
8 changed files with 96 additions and 2 deletions

5
frontend/.dockerignore Normal file
View File

@@ -0,0 +1,5 @@
node_modules
npm-debug.log
dist
.git
.gitignore

18
frontend/Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM node:20-alpine
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci
# Copy source code
COPY . .
# Expose Vite dev server port
EXPOSE 5173
# Start Vite dev server
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]

View File

@@ -2,7 +2,8 @@
"name": "aerzte",
"type": "module",
"private": true,
"version": "0.0.0",
"version": "1.0.0",
"vdate": "2025-11-23 11:00 UTC",
"scripts": {
"dev": "vite",
"build": "vite build",

View File

@@ -4,6 +4,7 @@ import AppointmentList from './components/AppointmentList';
import './AppStyles.css';
// Die Basis-URL der Express-API
// Always use localhost because the browser runs on the host machine
const API_URL = 'http://localhost:3001/api/appointments';
// Funktion zur Umwandlung von MongoDBs _id in die interne id des Frontends

View File

@@ -4,4 +4,11 @@ import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
server: {
host: '0.0.0.0',
port: 5173,
watch: {
usePolling: true
}
}
})