Skip to content

Your First App

Deploy your first app to Basepod in under 5 minutes.

Prerequisites

  • Basepod server running
  • bp CLI installed
  • Logged in (bp login your-server.com)

Option 1: Deploy a Docker Image

The fastest way to deploy:

bash
# Create an app
bp create myapp

# Deploy nginx
bp deploy myapp --image nginx:latest

Your app is now live at https://myapp.your-server.com

Option 2: Deploy from Source

Create a Simple App

Create a directory with your app:

bash
mkdir myapp && cd myapp

Create index.html:

html
<!DOCTYPE html>
<html>
<head>
    <title>My First App</title>
</head>
<body>
    <h1>Hello from Basepod!</h1>
</body>
</html>

Create a Dockerfile:

dockerfile
FROM nginx:alpine
COPY index.html /usr/share/nginx/html/

Initialize and Deploy

bash
# Initialize basepod config
bp init

# Deploy
bp push

Option 3: Node.js App

Create a simple Express app:

bash
mkdir node-app && cd node-app
npm init -y
npm install express

Create index.js:

javascript
const express = require('express');
const app = express();
const port = process.env.PORT || 3000;

app.get('/', (req, res) => {
  res.send('Hello from Node.js!');
});

app.listen(port, () => {
  console.log(`Server running on port ${port}`);
});

Create Dockerfile:

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

Create basepod.yaml:

yaml
name: node-app
port: 3000

Deploy:

bash
bp push

Viewing Your App

After deployment:

  1. Web: Visit https://your-app.your-server.com
  2. Dashboard: Open Basepod dashboard > Apps
  3. Logs: Run bp logs your-app

Managing Your App

bash
# View logs
bp logs myapp

# Stop the app
bp stop myapp

# Start the app
bp start myapp

# Restart the app
bp restart myapp

# Delete the app
bp delete myapp

Next Steps

Released under the MIT License.