dev setup w/ hot reload
Build and Push Lunchtime Images (Kaniko) / build-and-push (push) Successful in 1m10s

This commit is contained in:
fhs52267
2026-04-02 21:12:33 +02:00
parent 696e881361
commit 37669fbc3a
4 changed files with 79 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
upstream backend {
server backend:5000;
}
upstream frontend {
server frontend:5173;
}
server {
listen 8080;
server_name _;
location /api/ {
proxy_pass http://backend/api/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location / {
proxy_pass http://frontend/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /__vite_ping {
access_log off;
return 200 "pong\n" Content-Type "text/plain";
}
}
+1
View File
@@ -3,3 +3,4 @@ uvicorn[standard]==0.34.0
PyYAML==6.0.2
python-multipart==0.0.20
email-validator==2.2.0
watchdog[watchmedo]==4.0.2
+28
View File
@@ -0,0 +1,28 @@
services:
nginx:
volumes:
- ../nginx.dev.conf:/etc/nginx/conf.d/default.conf:ro
backend:
build:
context: backend
dockerfile: Containerfile
volumes:
- ../.data:/app/data
- ../config.yaml:/app/config.yaml:ro
- ./backend/app:/app/app
command: uvicorn app.main:app --host 0.0.0.0 --port 5000 --reload
frontend:
build:
context: frontend
dockerfile: Containerfile.dev
volumes:
- ./frontend/src:/app/src
- ./frontend/public:/app/public
- ./frontend/index.html:/app/index.html
- ./frontend/vite.config.ts:/app/vite.config.ts
- ./frontend/tsconfig.json:/app/tsconfig.json
- ./frontend/tsconfig.node.json:/app/tsconfig.node.json
- /app/node_modules
command: npm run dev -- --host 0.0.0.0 --port 5173
+12
View File
@@ -0,0 +1,12 @@
FROM node:20-slim
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . ./
EXPOSE 5173
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "5173"]