Docs / Getting Started

Getting Started

Install Pier, create a project, and run your first stack.

1

Install Pier

# macOS
brew install joonapay/tap/pier

# Linux (amd64/arm64)
curl -fsSL https://pier.wejoona.com/install.sh | bash

# Verify installation
pier --version

Requires Docker Engine 24+ or OrbStack. Pier manages containers through the Docker API.

2

Initialize a project

mkdir myapp && cd myapp
pier init

# This creates pier.yml with a starter template
3

Define your services

pier.yml
services:
  api:
    build: ./api           # Build from Dockerfile
    port: 3000
    domain: api.myapp.dock # Automatic local HTTPS
    health: /api/health    # Wait for this before "ready"
    env:
      DATABASE_URL: postgres://db:5432/myapp

  web:
    build: ./web
    port: 5173
    domain: myapp.dock
    depends_on: [api]      # Start after API is healthy

  db:
    image: postgres:16
    port: 5432
    volumes:
      - pg_data:/var/lib/postgresql/data
    env:
      POSTGRES_DB: myapp
      POSTGRES_PASSWORD: dev

  redis:
    image: redis:7-alpine
    port: 6379
4

Start everything

$ pier up

  ✓ Building api...
  ✓ Building web...
  ✓ Starting db (postgres:16)
  ✓ Starting redis (redis:7-alpine)
  ✓ Starting api (./api)
  ✓ Health check passed: api → 200 OK
  ✓ Starting web (./web)
  ✓ HTTPS certs issued for myapp.dock, api.myapp.dock
  ✓ Dashboard: http://localhost:9090

  Ready. 4 services running.

  api   → https://api.myapp.dock
  web   → https://myapp.dock
  db    → localhost:5432
  redis → localhost:6379

CLI Commands

pier init [name]Create pier.yml in current directory
pier upStart all services
pier downStop all services
pier statusShow service status and health
pier logs [service]Tail logs (all or specific service)
pier restart [service]Restart one or all services
pier secrets set KEYSet an encrypted secret
pier secrets listList secret keys (not values)
pier deploy [host]Deploy to remote host via SSH
Next: Configuration Reference