Your First App
Deploy your first app to Basepod in under 5 minutes.
Prerequisites
- Basepod server running
bpCLI 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:latestYour 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 myappCreate 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 pushOption 3: Node.js App
Create a simple Express app:
bash
mkdir node-app && cd node-app
npm init -y
npm install expressCreate 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: 3000Deploy:
bash
bp pushViewing Your App
After deployment:
- Web: Visit
https://your-app.your-server.com - Dashboard: Open Basepod dashboard > Apps
- 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 myappNext Steps
- Docker Images - Deploy any Docker image
- Templates - One-click apps
- Configuration - Advanced settings