Jotzy/compose.yaml

45 lines
1 KiB
YAML
Raw Permalink Normal View History

2026-01-06 12:51:40 +00:00
services:
api:
build:
context: ./backend
2026-01-06 13:13:59 +00:00
container_name: fastnotes-api
2026-01-06 16:41:39 +00:00
environment:
2026-01-06 16:51:05 +00:00
- DATABASE_URL=${DATABASE_URL:-sqlite:////app/data/notes.db}
2026-01-06 16:41:39 +00:00
- SECRET_KEY=${SECRET_KEY:-change-this-in-production}
- CORS_ORIGINS=${CORS_ORIGINS:-*}
# Internal only - accessed via nginx proxy
expose:
- "8000"
volumes:
- api_data:/app/data
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://localhost:8000/health').read()",
]
2026-01-06 16:47:18 +00:00
interval: 10s
timeout: 5s
start_period: 40s
2026-01-06 16:41:39 +00:00
retries: 3
2026-01-06 12:51:40 +00:00
2026-01-06 16:41:39 +00:00
ui:
build:
context: ./frontend
args:
# Frontend will use /api path (proxied by nginx)
VITE_API_URL: ${VITE_API_URL:-/api}
container_name: fastnotes-ui
2026-01-06 16:52:46 +00:00
# Coolify manages ports via its proxy - expose instead of publish
expose:
- "80"
2026-01-06 16:41:39 +00:00
depends_on:
2026-01-06 16:51:05 +00:00
- api
2026-01-06 16:41:39 +00:00
restart: unless-stopped
volumes:
api_data: