Files
DentalManagementMH06/install-steps-5-13.sh
Gitead 1edf73fdc8 feat: add new frontend components, MH batch worker, and gitignore rules
- Add all new Frontend source files (pages, components, hooks, utils)
- Add selenium_MHBatchPaymentCheckWorker.py and MHSinglePaymentCheckWorker.py
- Add install-steps-5-13.sh setup script
- Update .gitignore to exclude runtime/sensitive data (backups, uploads,
  chat-history, keys, downloads, generated .d.ts files) while keeping folders
- Add .gitkeep to preserve empty runtime folders in git

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 00:23:43 -04:00

85 lines
3.0 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# =============================================================
# Dental Manager — Setup Steps 513
# Run this from a terminal where you can enter your sudo password
# =============================================================
set -e # stop on any error
cd "$(dirname "$0")" # always run from the project root
echo ""
echo "=============================="
echo " STEP 5 — Install PostgreSQL "
echo "=============================="
sudo apt-get install -y postgresql postgresql-contrib
sudo systemctl enable postgresql
sudo systemctl start postgresql
sudo -u postgres psql -c "CREATE DATABASE dentalapp OWNER postgres;" 2>/dev/null || echo "(database already exists, skipping)"
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'mypassword';"
sudo sed -i 's/scram-sha-256/md5/g' /etc/postgresql/*/main/pg_hba.conf
sudo systemctl restart postgresql
echo "✓ PostgreSQL ready"
echo ""
echo "=============================="
echo " STEP 6 — Install Redis "
echo "=============================="
sudo apt-get install -y redis-server
sudo systemctl enable redis-server
sudo systemctl start redis-server
redis-cli ping | grep -q PONG && echo "✓ Redis ready" || echo "⚠ Redis ping failed"
echo ""
echo "=============================="
echo " STEP 7 — npm install "
echo "=============================="
npm install
echo "✓ Node.js dependencies installed (Python venvs created via postinstall)"
echo ""
echo "=============================="
echo " STEP 9 — Setup .env files "
echo "=============================="
npm run setup:env
echo "✓ .env files created"
echo ""
echo ">>> STEP 9a: Cloudflare subdomain skipped."
echo " When ready, open apps/Frontend/.env and apps/Backend/.env"
echo " and replace 'yoursubdomain' with the office subdomain."
echo ""
echo "=============================="
echo " STEP 10 — Database setup "
echo "=============================="
npm run db:migrate
npm run db:generate
npm run db:seed
echo "✓ Database migrated, types generated, and seeded"
echo ""
echo "=============================="
echo " STEP 11 — Configure nginx "
echo "=============================="
sudo apt-get install -y nginx
sudo cp nginx.conf /etc/nginx/sites-available/dental-app
sudo ln -sf /etc/nginx/sites-available/dental-app /etc/nginx/sites-enabled/dental-app
sudo rm -f /etc/nginx/sites-enabled/default
sudo nginx -t && sudo systemctl reload nginx
echo "✓ nginx configured"
echo ""
echo "=============================="
echo " STEP 13 — Desktop shortcuts "
echo "=============================="
bash ~/Desktop/DentalManagementMH06/setup-desktop-shortcut.sh
echo "✓ Desktop shortcuts created"
echo ""
echo "============================================"
echo " All steps complete!"
echo ""
echo " STEP 12 — To run the app, open 2 terminals:"
echo " Terminal 1: cd ~/Desktop/DentalManagementMH06 && npm run dev"
echo " Terminal 2: cd ~/Desktop/DentalManagementMH06/apps/SeleniumService && .venv/bin/python3 agent.py"
echo "============================================"