Installation
This guide will help you set up ConstellationAPI on your local machine or in a production environment.
Prerequisites
- Node.js >= 18.0.0
- npm or yarn
- Docker (optional, for containerized deployment)
- AWS CLI (optional, for cloud deployment)
Local Installation
1. Clone the Repository
git clone <repository-url>
cd orbit-constellation-api
2. Install Dependencies
npm install
3. Environment Configuration
Create a .env file in the root directory:
cp .env.example .env
Edit .env with your credentials:
# Apideck Configuration
APIDECK_API_KEY=your_apideck_api_key
APIDECK_APP_ID=your_apideck_app_id
APIDECK_SERVICE_ID=jira
# Internal API Security
INTERNAL_API_KEY=your_secure_api_key
# Server Configuration
PORT=3007
NODE_ENV=development
LOG_LEVEL=info
4. Create Data Directory
mkdir -p data
The data directory stores tenant information in tenants.json.
5. Start the Server
Development mode (with auto-reload):
npm run dev
Production mode:
npm start
The API will be available at http://localhost:3007.
6. Verify Installation
Check the health endpoint:
curl http://localhost:3007/health
Expected response:
{
"status": "healthy",
"timestamp": "2024-01-01T00:00:00.000Z",
"version": "1.0.0",
"environment": "development"
}
Docker Installation
Using Docker Compose (Recommended)
# Start services
make dev
# Or manually:
docker-compose up -d --build
This will:
- Build the Docker image
- Start the container on port 3007
- Mount the
datadirectory for persistent storage
Using Docker Directly
# Build the image
docker build -t constellation-api .
# Run the container
docker run -p 3007:3007 \
-e APIDECK_API_KEY=your_key \
-e APIDECK_APP_ID=your_app_id \
-e INTERNAL_API_KEY=your_internal_key \
-v $(pwd)/data:/app/data \
constellation-api
Production Deployment
AWS ECS Fargate
See the Deployment Guide for detailed instructions on deploying to AWS using Terraform.
Environment Variables
Required environment variables for production:
| Variable | Description | Required |
|---|---|---|
APIDECK_API_KEY | Your Apideck API key | Yes |
APIDECK_APP_ID | Your Apideck application ID | Yes |
INTERNAL_API_KEY | Internal API key for authentication | Yes |
PORT | Server port (default: 3007) | No |
NODE_ENV | Environment (production/development) | No |
LOG_LEVEL | Logging level (info/debug/error) | No |
Next Steps
- Quickstart - Make your first API call
- Authentication - Learn about authentication