Add Docker support with multi-stage Vite build and nginx serving

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Shayan Azadi
2026-07-01 00:32:25 +03:30
parent ce6c110e06
commit d7252f1d21
5 changed files with 118 additions and 0 deletions

18
docker-compose.yml Normal file
View File

@@ -0,0 +1,18 @@
services:
accounting-frontend:
build:
context: .
dockerfile: Dockerfile
args:
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-http://localhost:8001/api}
VITE_ACCOUNTING_BASE_URL: ${VITE_ACCOUNTING_BASE_URL:-http://localhost:8010/api}
VITE_BASE_PATH: ${VITE_BASE_PATH:-/}
container_name: funzone_accounting_frontend
ports:
- "127.0.0.1:3006:80"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/health"]
interval: 30s
timeout: 10s
retries: 3