36 lines
831 B
YAML
36 lines
831 B
YAML
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
ports:
|
|
- "4500:4500"
|
|
env_file:
|
|
- ./backend/.env
|
|
environment:
|
|
# These override anything in .env so they are always correct for Docker
|
|
NODE_ENV: production
|
|
HOST: "0.0.0.0"
|
|
DB_PATH: /app/data/app.db
|
|
volumes:
|
|
- db_data:/app/data
|
|
restart: unless-stopped
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
args:
|
|
# VITE_API_URL is read from frontend/.env and baked into the bundle
|
|
# at build time by Vite. It must be the URL the browser uses to reach
|
|
# the backend — not an internal Docker hostname.
|
|
VITE_API_URL: ${VITE_API_URL}
|
|
env_file:
|
|
- ./frontend/.env
|
|
ports:
|
|
- "4501:4501"
|
|
depends_on:
|
|
- backend
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
db_data:
|