Zapper

Services

How to add a native or Docker service to a Zapper project, from zap.yaml ports to deployment.

How to add a service under Zapper.

Configuration Files

  • zap.yaml — Local services (native for Node.js apps, docker for containers)
  • .arcnet/arcnet.yaml — Opt-in production deployment selections
  • .env.local — Environment variables for local dev

Adding a New Service

1. Add a port var if you need a port

Zapper will generate random ports per stack for you, just choose an appropriate name e.g.:

ports: [FRONTEND_PORT, BACKEND_PORT, MY_PORT]

2. Add to zap.yaml

Node.js service:

native:
  my-service:
    cmd: pnpm --filter=@mp-lb/my-service dev

Docker service:

docker:
  my-database:
    image: postgres:16
    ports:
      - "${MY_PORT}:5432" # random:container

3. Select a deployment when needed

Add a project-specific service or site to .arcnet/arcnet.yaml when it should be deployed. ArcNet provides the standard provider configuration and deployment workflow. Review:

  • Compute target (Cloud Run vs GCE vs Vercel)
  • Container image and environment variables
  • Networking, IAM, and DNS if needed
  • Outputs for URLs or connection strings

4. Create package.json

Use @mp-lb/package-name naming with dev, start, and build scripts.

5. Start Service

zap up my-service

Environment Variables Checklist

Keep local values in .env.local. For production, declare public values under variables and select service secret names in .arcnet/arcnet.yaml; encrypted sources and consumer mappings determine which credentials reach deployment commands.

On this page