Add NextSnap PWA with photo gallery viewer and continuous capture
Offline-first photo capture app for Nextcloud with: - Camera capture with continuous mode (auto-reopens after each photo) - File browser with fullscreen image gallery, swipe navigation, and rename - Upload queue with background sync engine - Admin panel for Nextcloud user management - Service worker for offline-first caching (v13) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
69
Makefile
Normal file
69
Makefile
Normal file
@@ -0,0 +1,69 @@
|
||||
.PHONY: help build up down restart logs shell test clean dev prod
|
||||
|
||||
help:
|
||||
@echo "NextSnap - Available Commands:"
|
||||
@echo " make build - Build Docker image"
|
||||
@echo " make up - Start containers (production)"
|
||||
@echo " make down - Stop containers"
|
||||
@echo " make restart - Restart containers"
|
||||
@echo " make logs - View container logs"
|
||||
@echo " make shell - Open shell in container"
|
||||
@echo " make test - Run tests"
|
||||
@echo " make clean - Remove containers and volumes"
|
||||
@echo " make dev - Start development environment"
|
||||
@echo " make prod - Start production environment"
|
||||
|
||||
build:
|
||||
docker-compose build
|
||||
|
||||
up:
|
||||
docker-compose up -d
|
||||
|
||||
down:
|
||||
docker-compose down
|
||||
|
||||
restart:
|
||||
docker-compose restart
|
||||
|
||||
logs:
|
||||
docker-compose logs -f --tail=100
|
||||
|
||||
shell:
|
||||
docker-compose exec nextsnap /bin/bash
|
||||
|
||||
test:
|
||||
docker-compose exec nextsnap pytest tests/
|
||||
|
||||
clean:
|
||||
docker-compose down -v
|
||||
docker system prune -f
|
||||
|
||||
dev:
|
||||
docker-compose -f docker-compose.dev.yml up
|
||||
|
||||
dev-build:
|
||||
docker-compose -f docker-compose.dev.yml build
|
||||
|
||||
dev-down:
|
||||
docker-compose -f docker-compose.dev.yml down
|
||||
|
||||
prod:
|
||||
docker-compose up -d
|
||||
|
||||
status:
|
||||
docker-compose ps
|
||||
|
||||
health:
|
||||
@curl -f http://localhost:8000/api/health || echo "Health check failed"
|
||||
|
||||
backup-sessions:
|
||||
docker run --rm -v nextsnap_flask_sessions:/data -v $(PWD):/backup \
|
||||
alpine tar czf /backup/sessions_backup_$(shell date +%Y%m%d_%H%M%S).tar.gz -C /data .
|
||||
|
||||
restore-sessions:
|
||||
@read -p "Enter backup file name: " file; \
|
||||
docker run --rm -v nextsnap_flask_sessions:/data -v $(PWD):/backup \
|
||||
alpine tar xzf /backup/$$file -C /data
|
||||
|
||||
generate-secret:
|
||||
@python -c "import secrets; print(secrets.token_hex(32))"
|
||||
Reference in New Issue
Block a user