GitHub Service
Build and deploy services from GitHub repositories with Docker
The github service type builds and deploys applications from a GitHub repository using a Dockerfile. This is the most common service type for application code that needs to be built from source.
Examples
Minimal configuration with only required fields:
Docker Configuration
The docker section defines how the application is built and run.
docker.defaultTag
The default Docker image tag, typically matching the branch name.
docker.builder
Configuration for the Docker build process. The engine field specifies which build engine to use:
buildkit- BuildKit engine (default)codefresh- Codefresh build enginekaniko- Kaniko build engine
docker.app (Required)
Configuration for the main application container:
dockerfilePath- Required. Path to Dockerfile relative to repo rootcommand- Override container entrypointarguments- Arguments passed to the command. Use%%SPLIT%%as a delimiter for spaces (e.g.,-c%%SPLIT%%npm run start)env- Environment variablesports- Exposed container ports
docker.init (Optional)
Configuration for an init container that runs before the main application. Uses the same fields as docker.app.
Deployment Options
The deployment section configures how the service is deployed to Kubernetes. All fields are optional.
public
Controls whether the service is exposed via ingress for external access.
true- Creates an ingress, service gets a public URLfalse- Internal only, accessible only within the cluster
capacityType
Specifies the node capacity type for scheduling:
spot- Use spot/preemptible instances (cost-effective)on-demand- Use on-demand instances (more reliable)
resource
CPU and memory requests and limits for the container:
| Field | Description |
|---|---|
cpu.request | Minimum CPU guaranteed (e.g., 100m) |
cpu.limit | Maximum CPU allowed (e.g., 1000m) |
memory.request | Minimum memory guaranteed (e.g., 256Mi) |
memory.limit | Maximum memory allowed (e.g., 1Gi) |
readiness
Health check configuration to determine when the service is ready to receive traffic.
HTTP health check:
| Field | Description |
|---|---|
httpGet.path | HTTP endpoint path (e.g., /health) |
httpGet.port | Port to check |
TCP health check:
| Field | Description |
|---|---|
tcpSocketPort | TCP port to check connectivity |
Common fields:
| Field | Description |
|---|---|
initialDelaySeconds | Delay before first check |
periodSeconds | Interval between checks |
timeoutSeconds | Timeout for each check |
successThreshold | Consecutive successes to be healthy |
failureThreshold | Consecutive failures to be unhealthy |
hostnames
Custom hostname configuration. If omitted, hostnames are auto-constructed from global_config values.
| Field | Description |
|---|---|
host | Custom hostname suffix |
defaultInternalHostname | Internal Kubernetes hostname |
defaultPublicUrl | Default public URL |
acmARN | AWS ACM certificate ARN for TLS |
network
Advanced network configuration:
| Field | Description |
|---|---|
ipWhitelist | Array of allowed IP ranges (CIDR notation) |
pathPortMapping | Map URL paths to container ports |
hostPortMapping | Map hostnames to container ports |
grpc.enable | Enable gRPC support |
grpc.host | gRPC hostname |
serviceDisks
Persistent volume mounts for stateful data:
| Field | Required | Description |
|---|---|---|
name | Yes | Volume name |
mountPath | Yes | Path inside the container |
storageSize | Yes | Storage size (e.g., 10Gi) |
accessModes | No | ReadWriteOnce or ReadWriteMany |
medium | No | Storage medium |
Fields Reference
Required Fields
| Field | Type | Description |
|---|---|---|
repository | string | GitHub repository in owner/repo format |
branchName | string | Branch to build from |
docker | object | Docker build configuration (see above) |
Optional Fields
| Field | Type | Description |
|---|---|---|
deployment | object | Deployment configuration (see above) |
envLens | boolean | Enable environment lens ingress banner |
Template Variables
Reference other services in your configuration using template variables. See the Template Variables guide for the complete list.