chore: initial project setup with backend, frontend, CI/CD, and documentation
Add complete NexaFabric project structure including: - FastAPI backend with SQLAlchemy models, JWT auth, RBAC, audit logging, and provider interfaces - React + TypeScript frontend with Vite, Tailwind CSS, TanStack Query, and Zustand - Docker Compose configuration for PostgreSQL, Redis, API, worker, frontend, and nginx - GitHub Actions and GitLab CI workflows for testing, linting, building, and security scanning - Environment
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
mkdir -p backups
|
||||
docker compose exec -T postgres pg_dump -U nexafabric nexafabric >"backups/nexafabric-$(date +%Y%m%d-%H%M%S).sql"
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
install -d /usr/local/lib/nexafabric /usr/local/bin /etc/nexafabric
|
||||
install -m 0755 agent/nexafabric_agent.py /usr/local/lib/nexafabric/nexafabric_agent.py
|
||||
cat >/usr/local/bin/nexafabric-agent <<'EOF'
|
||||
#!/usr/bin/env sh
|
||||
exec python3 /usr/local/lib/nexafabric/nexafabric_agent.py
|
||||
EOF
|
||||
chmod 0755 /usr/local/bin/nexafabric-agent
|
||||
install -m 0644 deploy/systemd/nexafabric-agent.service /etc/systemd/system/nexafabric-agent.service
|
||||
systemctl daemon-reload
|
||||
systemctl enable --now nexafabric-agent.service
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: scripts/restore.sh backups/file.sql" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker compose exec -T postgres psql -U nexafabric nexafabric <"$1"
|
||||
|
||||
Reference in New Issue
Block a user