quickstart/README.md

4.2 KiB

Deploy to InsureCo Git

Push your code to git.insureco.io and it deploys automatically.


5-Minute Setup

Step 1: Get Access

  1. Go to git.insureco.io
  2. Sign in with bio-id (or create an account)
  3. Go to Settings → Applications → Generate Token
  4. Save your token

Step 2: Configure Git

# Add to ~/.ssh/config
cat >> ~/.ssh/config << 'EOF'
Host git.insureco.io
    HostName git.insureco.io
    Port 2222
    User jci-admin
    IdentityFile ~/.ssh/id_ed25519
EOF

Step 3: Create Your Service

# Install CLI
npm install -g @insureco/cli

# Login
iec git login YOUR_TOKEN

# Add your SSH key
iec git ssh-key

# Create a repo
iec git create my-service

Step 4: Push Your Code

# Clone and add your code
git clone git@git.insureco.io:insureco/my-service.git
cd my-service

# Add a Dockerfile
cat > Dockerfile << 'EOF'
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
EXPOSE 3000
CMD ["node", "src/index.js"]
EOF

# Push
git add -A
git commit -m "Initial deployment"
git push origin main

That's it! Your service will build and deploy automatically.


What Happens When You Push

git push origin main
         │
         ▼
┌─────────────────────┐
│   git.insureco.io   │ ← Receives push
└──────────┬──────────┘
           │ webhook
           ▼
┌─────────────────────┐
│    iec-builder      │ ← Builds Docker image
└──────────┬──────────┘
           │ deploys
           ▼
┌─────────────────────┐
│    Kubernetes       │ ← Runs your service
└─────────────────────┘
           │
           ▼
   https://my-service.tawa.insureco.io

Branch → Environment

Push to Deploys to URL
main Production my-service.tawa.insureco.io
develop Sandbox my-service.sandbox.tawa.insureco.io
staging UAT my-service.uat.tawa.insureco.io

Required Files

Your repo needs at minimum:

my-service/
├── Dockerfile          # How to build your app
├── package.json        # (or requirements.txt, go.mod, etc.)
└── src/
    └── index.js        # Your app code

Example Dockerfile (Node.js)

FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
EXPOSE 3000
CMD ["node", "src/index.js"]

Example Dockerfile (Python)

FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["python", "app.py"]

Example Dockerfile (Go)

FROM golang:1.21-alpine AS builder
WORKDIR /app
COPY go.* ./
RUN go mod download
COPY . .
RUN go build -o main .

FROM alpine:latest
COPY --from=builder /app/main /main
EXPOSE 8080
CMD ["/main"]

Monitor Your Deployment

# Watch build progress
iec builds

# View logs
iec logs my-service

# Check status
iec status my-service

CLI Reference

iec git login <token>   # Authenticate
iec git list            # List your repos
iec git create <name>   # Create repo + webhook
iec git clone <name>    # Clone a repo
iec git ssh-key         # Add SSH key

iec deploy              # Manual deploy
iec builds              # List builds
iec logs <service>      # View logs
iec status <service>    # Check status

Troubleshooting

Can't push?

# Test SSH connection
ssh -T -p 2222 jci-admin@git.insureco.io

# Should see: "Hi there, USERNAME!"

Build not triggering?

# Check webhook exists
iec git get my-service

# Add webhook manually
iec git webhook my-service

Need help?


git.insureco.io — Push code. Ship fast.