This guide covers how to deploy Pangolin in various environments, from local development to production-ready Docker containers.
To run Pangolin locally for development or testing, ensure you have the Rust toolchain installed.
# Clone the repository
git clone https://github.com/your-org/pangolin.git
cd pangolin
# Run the API server
cargo run --bin pangolin_apiThe server listens on 0.0.0.0:8080 by default. You can change this using the PORT environment variable.
Pangolin is designed to be cloud-native and easily containerized.
Pangolin provides a docker-compose.yml that sets up the API server along with common dependencies like MinIO (S3), PostgreSQL, and MongoDB.
# Start all services
docker-compose up -d
# Check logs
docker-compose logs -f pangolin-apiServices Exposed:
- Pangolin API:
http://localhost:8080 - MinIO Console:
http://localhost:9001(Credentials:minioadmin/minioadmin) - PostgreSQL:
localhost:5432
# From the root of the repository
docker build -t pangolin:latest .docker run -p 8080:8080 \
-e PANGOLIN_STORAGE_TYPE=memory \
-e PANGOLIN_NO_AUTH=true \
alexmerced/pangolin-api:latestNote
For production deployments, we recommend pinning to a specific version, e.g., alexmerced/pangolin-api:0.1.0.
When moving to production, consider the following:
Do not use memory storage in production. Configure a robust backend like PostgreSQL or MongoDB.
export DATABASE_URL="postgresql://user:pass@db-host:5432/pangolin"Ensure PANGOLIN_NO_AUTH is NOT set to true. Set a strong PANGOLIN_JWT_SECRET.
For storage access, prefer AwsSts or AzureSas vending strategies over static keys. See Credential Vending.
Set RUST_LOG=info or debug and integrate the container logs with your logging provider.