Local setup

Run commands from the Atlas application repository root, not from the Docusaurus repository. These instructions describe the current Docker Compose development environment, not production deployment.

Prerequisites

  • Docker with Compose.
  • PHP and Composer compatible with the app’s locked dependencies.
  • Node.js and npm compatible with the app’s frontend dependencies.
  • Approved development Microsoft OAuth and Turnstile configuration.
  • Approved Autotask and Azure Foundry access if you need live sync or sentiment analysis.

Use only a development database and approved integration accounts. Local synchronization and AI analysis make real external requests; they are not automatically mocked.

1. Install dependencies and configure Laravel

cd src
composer install
npm ci

For a new checkout only, copy .env.example to .env. Do not overwrite an existing local environment file:

cp .env.example .env
cd ..

Set development values in src/.env, including:

APP_ENV=development
DB_CONNECTION=pgsql
DB_HOST=postgres-its-internal-app
DB_PORT=5432
DB_DATABASE=dev
QUEUE_CONNECTION=database

The database hostname above matches the current Compose service name; the example environment file may use a different hostname. Set database credentials to match your local Compose database. Configure APP_URL, ASSET_URL, Microsoft redirect settings, and Turnstile for your approved local hostname.

Keep secrets in your untracked environment file, never in documentation or commits. Configure Autotask credentials and the approved zone URL for live sync. Sentiment analysis additionally needs AZURE_FOUNDRY_API_KEY, AZURE_FOUNDRY_ENDPOINT, and AZURE_FOUNDRY_DEPLOYMENT.

Leave outbound mail safeguards in place. Configure an approved recipient allowlist or override only if you need to test mail.

2. Start the containers

docker compose up -d --build
docker compose ps

Compose uses the network named cloudflare_tunnel_network. If startup reports that it cannot find that network, inspect your Docker network setup and create it if absent:

docker network create cloudflare_tunnel_network

The default app port is 8881, unless overridden by APP_PORT. Follow your team’s local proxy and Microsoft redirect configuration rather than substituting a production hostname.

3. Initialize the development database

Generate a key only for a new environment; regenerating an existing key can make encrypted data unreadable:

docker exec -u www-data -w /var/www its-internal-app-its-internal-app-1 \
  php artisan key:generate

Apply migrations and seed the development database:

docker exec -u www-data -w /var/www its-internal-app-its-internal-app-1 \
  php artisan migrate --seed

Use the configured app user for Artisan commands so generated logs and compiled views remain writable by the web process. The Compose bind mount maps src/ to /var/www; container names can differ if you change the Compose project name.

4. Start frontend assets

In another terminal:

cd src
npm run dev

Use npm run build instead when you need compiled assets without the Vite development server.

5. Verify the PHP worker before syncing

Required: follow Queue workers and background jobs and confirm laravel-queue:laravel-queue_00 is RUNNING. A working web page does not mean background jobs are running.

Then sign in with an authorized development account and confirm the active MSP organization. A platform administrator can use Development Sync to prepare reference data. It does not import tickets; see Data and synchronization.

6. Validate your changes

Follow Testing and troubleshooting. Do not run destructive database-reset commands against a shared development environment.