fix: remove dev volume mounts that shadow app code, add named volume for data, fix nginx resolver

This commit is contained in:
TheRaiwy
2026-05-27 15:02:11 +03:00
parent ea02a77772
commit e11df2ff92
2 changed files with 11 additions and 10 deletions
+7 -9
View File
@@ -8,13 +8,8 @@ services:
environment:
- PYTHONUNBUFFERED=1
volumes:
- ./backend/data:/app/data
- ./backend/app:/app/app
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
interval: 10s
timeout: 5s
retries: 5
- kopilka-data:/app/data
restart: unless-stopped
frontend:
build:
@@ -23,5 +18,8 @@ services:
ports:
- "3000:3000"
depends_on:
backend:
condition: service_healthy
- backend
restart: unless-stopped
volumes:
kopilka-data:
+4 -1
View File
@@ -2,6 +2,9 @@ server {
listen 3000;
server_name _;
resolver 127.0.0.11 valid=10s;
set $backend_url http://backend:8000;
root /usr/share/nginx/html;
index index.html;
@@ -10,7 +13,7 @@ server {
}
location /api/ {
proxy_pass http://backend:8000;
proxy_pass $backend_url;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}