Skip to main content
Orchard can clone your GitHub repository, build a Docker image, and deploy it automatically. This is the simplest way to get your application running without setting up a separate CI/CD pipeline.

Prerequisites

  • A project in Orchard
  • A GitHub repository with a Dockerfile
  • GitHub access configured (for private repositories)

Creating a Deployment

1

Navigate to your project

Open the project where you want to create the deployment.
2

Click 'New Deployment'

Click the New Deployment button.
3

Select 'From GitHub'

Choose the From GitHub deployment method.
4

Configure the deployment

Fill in the required fields:
FieldDescriptionExample
NameUnique name for this deploymentapi-server
Repository URLFull GitHub repository URLhttps://github.com/org/repo
BranchBranch to build frommain
Dockerfile PathPath to your Dockerfile./Dockerfile
PortPort your application listens on3000
5

Configure build options

  • Build Type: Choose dockerfile (default) or railpack
  • Build From Root: Enable if your Dockerfile needs access to the entire repo
6

Add environment variables (optional)

Add any environment variables your application needs.
7

Create

Click Create Deployment to start the build process.

Build Process

When you create a GitHub deployment, Orchard runs through these steps:
1. Clone        → Repository is cloned from GitHub
2. Build        → Docker image is built using your Dockerfile
3. Push         → Image is pushed to Orchard's private registry
4. Deploy       → Kubernetes deployment is created
You can monitor each step in real-time from the deployment’s Logs tab.

Build Types

Dockerfile (Default)

The standard build type. Orchard runs docker build using your Dockerfile:
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]

Railpack

Railpack is an alternative builder optimized for Ruby on Rails applications. It automatically:
  • Detects Rails configuration
  • Installs dependencies
  • Compiles assets
  • Sets up the runtime environment
Railpack is specifically designed for Rails apps. For other frameworks, use the standard Dockerfile build type.

Dockerfile Path

The Dockerfile Path tells Orchard where to find your Dockerfile:
PathLocation
./DockerfileRepository root
./docker/Dockerfiledocker subdirectory
./services/api/DockerfileNested path for monorepos

Build Context

The Build From Root option controls the Docker build context:
The build context is the directory containing the Dockerfile.
repo/
├── docker/
│   └── Dockerfile  ← Build context starts here
└── src/
Your Dockerfile can only COPY files from the docker/ directory.Pros: Faster builds, smaller context Cons: Limited file access

Private Repositories

For private GitHub repositories, you need to configure GitHub access:
1

Go to user settings

Click on your profile and select Settings.
2

Connect GitHub

In the GitHub section, authorize Orchard to access your repositories.
3

Use the repository

Now you can deploy from any repository you have access to.

Rebuilding

To rebuild your deployment with the latest code:
1

Open your deployment

Navigate to the deployment you want to rebuild.
2

Click 'Rebuild'

Click the Rebuild button.
3

Wait for completion

Orchard will clone the latest code, build a new image, and deploy it.
Rebuilding uses the same branch and Dockerfile path as the original deployment. To change these, update the deployment settings.

Canceling a Build

If you need to stop an in-progress build:
  1. Go to your deployment
  2. Click Cancel Build
  3. The build will be terminated and no changes will be made

Image History

Every successful build creates a new image that’s stored in your deployment’s history. You can:
  • View all past builds with timestamps
  • See which Git commit each build corresponds to
  • Rollback to any previous build

Rollbacks

To rollback to a previous version:
1

Open History tab

Navigate to your deployment’s History tab.
2

Find the version

Locate the image version you want to restore.
3

Rollback

Click Rollback next to that version.
4

Confirm

Confirm the rollback. Your deployment will update to use the older image.

Example: Node.js Application

Here’s a complete example for deploying a Node.js app: Repository structure:
my-api/
├── Dockerfile
├── package.json
├── package-lock.json
└── src/
    └── index.js
Dockerfile:
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
EXPOSE 3000
CMD ["node", "src/index.js"]
Deployment configuration:
  • Name: my-api
  • Repository: https://github.com/myorg/my-api
  • Branch: main
  • Dockerfile Path: ./Dockerfile
  • Port: 3000

Troubleshooting

If the repository fails to clone:
  1. Verify the repository URL is correct
  2. Check that the branch exists
  3. For private repos, ensure GitHub access is configured
If the Docker build fails:
  1. Check the build logs for error messages
  2. Verify your Dockerfile is valid
  3. Ensure all required files are in the build context
  4. Try enabling “Build From Root” if files are missing
If the image fails to push:
  1. Check the build logs for registry errors
  2. This is usually a temporary issue - try rebuilding

Next Steps