Prerequisites
- A project in Orchard
- A GitHub repository with a Dockerfile
- GitHub access configured (for private repositories)
Creating a Deployment
Configure the deployment
Fill in the required fields:
| Field | Description | Example |
|---|---|---|
| Name | Unique name for this deployment | api-server |
| Repository URL | Full GitHub repository URL | https://github.com/org/repo |
| Branch | Branch to build from | main |
| Dockerfile Path | Path to your Dockerfile | ./Dockerfile |
| Port | Port your application listens on | 3000 |
Configure build options
- Build Type: Choose
dockerfile(default) orrailpack - Build From Root: Enable if your Dockerfile needs access to the entire repo
Build Process
When you create a GitHub deployment, Orchard runs through these steps:Build Types
Dockerfile (Default)
The standard build type. Orchard runsdocker build using your Dockerfile:
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
TheDockerfile Path tells Orchard where to find your Dockerfile:
| Path | Location |
|---|---|
./Dockerfile | Repository root |
./docker/Dockerfile | docker subdirectory |
./services/api/Dockerfile | Nested path for monorepos |
Build Context
The Build From Root option controls the Docker build context:- Disabled (Default)
- Enabled
The build context is the directory containing the Dockerfile.Your Dockerfile can only
COPY files from the docker/ directory.Pros: Faster builds, smaller context
Cons: Limited file accessPrivate Repositories
For private GitHub repositories, you need to configure GitHub access:Rebuilding
To rebuild your deployment with the latest code: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:- Go to your deployment
- Click Cancel Build
- 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:Example: Node.js Application
Here’s a complete example for deploying a Node.js app: Repository structure:- Name:
my-api - Repository:
https://github.com/myorg/my-api - Branch:
main - Dockerfile Path:
./Dockerfile - Port:
3000
Troubleshooting
Clone failed
Clone failed
If the repository fails to clone:
- Verify the repository URL is correct
- Check that the branch exists
- For private repos, ensure GitHub access is configured
Build failed
Build failed
If the Docker build fails:
- Check the build logs for error messages
- Verify your Dockerfile is valid
- Ensure all required files are in the build context
- Try enabling “Build From Root” if files are missing
Push failed
Push failed
If the image fails to push:
- Check the build logs for registry errors
- This is usually a temporary issue - try rebuilding