PSA/docker/dev-env/start-dev-env.sh
Hermes 284313f908
Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Initial import of AlgaPSA codebase from PSA server
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz

Source: /opt/alga-psa on psa.joliet.tech
2026-06-22 16:12:17 -05:00

69 lines
2.6 KiB
Bash
Executable File

#!/bin/bash
set -e
echo "🚀 Starting Alga PSA Development Environment"
echo "PR: ${ALGA_PR_NUMBER:-unknown}"
echo "Branch: ${ALGA_BRANCH:-unknown}"
# Increase file watcher limits for development
echo "⚙️ Configuring file watcher limits..."
sudo sysctl -w fs.inotify.max_user_watches=524288 || echo "Warning: Could not set max_user_watches"
sudo sysctl -w fs.inotify.max_user_instances=256 || echo "Warning: Could not set max_user_instances"
# Configure git if environment variables are set
if [ -n "$GIT_AUTHOR_NAME" ]; then
git config --global user.name "$GIT_AUTHOR_NAME"
fi
if [ -n "$GIT_AUTHOR_EMAIL" ]; then
git config --global user.email "$GIT_AUTHOR_EMAIL"
fi
# Set up workspace permissions
sudo chown -R coder:coder /home/coder/alga-psa
# Navigate to project directory
cd /home/coder/alga-psa
# Install/update dependencies if package.json exists
# Check if node_modules exists and package.json has changed
if [ -f "package.json" ]; then
if [ ! -d "node_modules" ] || [ "package.json" -nt "node_modules" ]; then
echo "📦 Installing/updating Node.js dependencies..."
npm install
else
echo "✅ Root dependencies already installed"
fi
fi
if [ -f "server/package.json" ]; then
if [ ! -d "server/node_modules" ] || [ "server/package.json" -nt "server/node_modules" ]; then
echo "📦 Installing/updating server dependencies..."
cd server && npm install && cd ..
else
echo "✅ Server dependencies already installed"
fi
fi
# Install tools dependencies if they exist
if [ -f "tools/ai-automation/package.json" ]; then
if [ ! -d "tools/ai-automation/node_modules" ] || [ "tools/ai-automation/package.json" -nt "tools/ai-automation/node_modules" ]; then
echo "🤖 Installing/updating AI automation dependencies..."
cd tools/ai-automation && npm install && cd ../..
else
echo "✅ AI automation dependencies already installed"
fi
fi
# Install AssemblyScript template dependencies if they exist
if [ -f "server/src/invoice-templates/assemblyscript/package.json" ]; then
if [ ! -d "server/src/invoice-templates/assemblyscript/node_modules" ] || [ "server/src/invoice-templates/assemblyscript/package.json" -nt "server/src/invoice-templates/assemblyscript/node_modules" ]; then
echo "📄 Installing/updating AssemblyScript template dependencies..."
cd server/src/invoice-templates/assemblyscript && npm install && cd ../../../..
else
echo "✅ AssemblyScript template dependencies already installed"
fi
fi
# Start code-server
echo "🖥️ Starting code-server..."
exec /usr/bin/entrypoint.sh --bind-addr 0.0.0.0:8080 /home/coder/alga-psa