Deploy

Learn how to deploy web applications on Piglet Run.

Overview

Piglet Run supports deploying various web applications:

  • Static Sites: HTML, CSS, JavaScript
  • Node.js: Express, Next.js, React
  • Python: Flask, Django, FastAPI
  • PHP: Laravel, WordPress

Quick Deploy

Deploy a static site:

pig deploy ./my-site

Deploy Static Site

From Local Directory

pig deploy ./dist --name my-site

From Git Repository

pig deploy https://github.com/user/repo --name my-site

Deploy Node.js Application

Basic Deployment

cd my-node-app
pig deploy --type nodejs

With Custom Port

pig deploy --type nodejs --port 3000

Configuration

Create piglet.yml in your project:

type: nodejs
entry: server.js
port: 3000
env:
  NODE_ENV: production

Deploy Python Application

Flask Application

pig deploy --type python --framework flask

Django Application

pig deploy --type python --framework django

Deployment Management

List Deployments

pig deploy list

View Logs

pig deploy logs my-site

Restart Application

pig deploy restart my-site

Remove Deployment

pig deploy remove my-site

Next Steps