Update README.md with installation instructions and Docker usage; add docker-compose.yml for service orchestration

This commit is contained in:
Felix Schlusche
2025-10-23 00:57:37 +02:00
parent b4967327a1
commit c8c2a800bb
3 changed files with 86 additions and 23 deletions

27
docker-compose.yml Normal file
View File

@@ -0,0 +1,27 @@
version: '3.8'
services:
timetracker:
build:
context: .
dockerfile: Dockerfile
container_name: timetracker-app
ports:
- "3000:3000"
volumes:
# Persistent volume for SQLite database
- timetracker-data:/app/db
environment:
- NODE_ENV=production
- PORT=3000
restart: unless-stopped
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s
volumes:
timetracker-data:
driver: local