Deploy from GitHub

↓ Download .md

Deploy from GitHub

Connect your GitHub repository and deploy automatically on every push or new release.

Prerequisites

  • A PodCubo account with a stack created
  • A GitHub repository with a Dockerfile at the root
  • Your GitHub account connected to PodCubo

Connecting GitHub

  1. Go to Stacks and enter your stack
  2. Click New AppAppGit Repository
  3. If you haven't connected GitHub yet, click Connect GitHub
  4. Authorize PodCubo to access your repositories
  5. Select the desired repository

Configuring the Deploy

Branch or Release

You can choose to deploy from:

  • Branch — automatic deploy on every push to that branch (e.g., main, develop)
  • Release — automatic deploy when a new release is published on GitHub

Port

Set the port your application listens on. PodCubo will route traffic to this port.

Common examples:
- Node.js/Express: 3000
- Python/Django: 8000
- Go: 8080
- Next.js: 3000

The Dockerfile

Your application needs a Dockerfile at the repository root. Here are examples for common frameworks:

Node.js

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

Next.js

FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./
EXPOSE 3000
CMD ["npm", "start"]

Python (Django/Flask)

FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:8000"]

Go

FROM golang:1.22-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o server .

FROM alpine:3.19
WORKDIR /app
COPY --from=builder /app/server .
EXPOSE 8080
CMD ["./server"]

Automatic Deploy

After creating the app, PodCubo runs the first deploy automatically. On every new push to the configured branch (or new release), a new deploy is triggered.

The process is:

  1. Clone — PodCubo clones your repository
  2. Build — Builds the Docker image from the Dockerfile
  3. Deploy — Starts the container with the new image

You can follow the progress in real-time on the app edit screen.

Manual Rebuild

If you need to redeploy manually (without a new push), use the Save & Rebuild button on the app edit screen.

Troubleshooting

Build failed

  • Check that the Dockerfile is at the repository root
  • Review the build logs on the app edit screen
  • PodCubo uses AI Error Diagnosis to analyze build errors and suggest fixes

App not responding

  • Confirm the port configured in PodCubo matches the port your app listens on
  • Make sure your app listens on 0.0.0.0 (not just localhost or 127.0.0.1)
  • Check the application logs in the logs tab