DocsSchema ReferenceGitHub Service

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 engine
  • kaniko - Kaniko build engine

docker.app (Required)

Configuration for the main application container:

  • dockerfilePath - Required. Path to Dockerfile relative to repo root
  • command - Override container entrypoint
  • arguments - Arguments passed to the command. Use %%SPLIT%% as a delimiter for spaces (e.g., -c%%SPLIT%%npm run start)
  • env - Environment variables
  • ports - 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 URL
  • false - 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:

FieldDescription
cpu.requestMinimum CPU guaranteed (e.g., 100m)
cpu.limitMaximum CPU allowed (e.g., 1000m)
memory.requestMinimum memory guaranteed (e.g., 256Mi)
memory.limitMaximum memory allowed (e.g., 1Gi)

readiness

Health check configuration to determine when the service is ready to receive traffic.

HTTP health check:

FieldDescription
httpGet.pathHTTP endpoint path (e.g., /health)
httpGet.portPort to check

TCP health check:

FieldDescription
tcpSocketPortTCP port to check connectivity

Common fields:

FieldDescription
initialDelaySecondsDelay before first check
periodSecondsInterval between checks
timeoutSecondsTimeout for each check
successThresholdConsecutive successes to be healthy
failureThresholdConsecutive failures to be unhealthy

hostnames

Custom hostname configuration. If omitted, hostnames are auto-constructed from global_config values.

FieldDescription
hostCustom hostname suffix
defaultInternalHostnameInternal Kubernetes hostname
defaultPublicUrlDefault public URL
acmARNAWS ACM certificate ARN for TLS

network

Advanced network configuration:

FieldDescription
ipWhitelistArray of allowed IP ranges (CIDR notation)
pathPortMappingMap URL paths to container ports
hostPortMappingMap hostnames to container ports
grpc.enableEnable gRPC support
grpc.hostgRPC hostname

serviceDisks

Persistent volume mounts for stateful data:

FieldRequiredDescription
nameYesVolume name
mountPathYesPath inside the container
storageSizeYesStorage size (e.g., 10Gi)
accessModesNoReadWriteOnce or ReadWriteMany
mediumNoStorage medium

Fields Reference

Required Fields

FieldTypeDescription
repositorystringGitHub repository in owner/repo format
branchNamestringBranch to build from
dockerobjectDocker build configuration (see above)

Optional Fields

FieldTypeDescription
deploymentobjectDeployment configuration (see above)
envLensbooleanEnable environment lens ingress banner

Template Variables

Reference other services in your configuration using template variables. See the Template Variables guide for the complete list.