add:deploy stuff

This commit is contained in:
2026-03-10 00:17:00 +09:00
parent 5264b81466
commit 3e3d644649
10 changed files with 211 additions and 52 deletions

35
docker-compose.yml Normal file
View File

@@ -0,0 +1,35 @@
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: