Initial commit: Inventory Barcode System
This commit is contained in:
34
docker-compose.yml
Normal file
34
docker-compose.yml
Normal file
@ -0,0 +1,34 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
inventory-app:
|
||||
build: .
|
||||
container_name: inventory-barcode-system
|
||||
ports:
|
||||
- "${PORT:-3000}:3000"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- PORT=3000
|
||||
- DATABASE_PATH=/app/data/inventory.db
|
||||
- DATABASE_BACKUP_PATH=/app/data/backups
|
||||
- EXPORT_DIR=/app/data/exports
|
||||
- TEMP_DIR=/app/data/temp
|
||||
- LOG_DIR=/app/logs
|
||||
- LOG_LEVEL=${LOG_LEVEL:-info}
|
||||
- BACKUP_ENABLED=true
|
||||
volumes:
|
||||
- inventory_data:/app/data
|
||||
- inventory_logs:/app/logs
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
volumes:
|
||||
inventory_data:
|
||||
driver: local
|
||||
inventory_logs:
|
||||
driver: local
|
||||
Reference in New Issue
Block a user