Skip to main content

Hello World App

This minimal app demonstrates the smallest deployment that still exercises builds, a service, and ingress routing.

  1. Define the app name.
  2. Create a build that defines how a container image is produced.
  3. Declare a service with image_from_build (or image) and expose a port.
  4. Add an ingress rule to get an accessible URL for your service.

In this example, we have a simple web service that is using the publicly available nginx image:

name: hello-greyhound
services:
- name: web
image: nginx:1.27-alpine
ports:
- containerPort: 80
env:
- name: APP_MESSAGE
value: 'Hello, greyhound!'
rules:
- service: web
hostnames:
- hello.example.com
path: /

If you want to define your own image, you can swap image for image_from_build and reference a build you define.

builds:
- name: web-build
dockerfile: Dockerfile
services:
- name: web
image_from_build: web-build
ports:
- containerPort: 3000

Important notes:

  • Ensure service names and rule targets match.
  • At least one port is needed if you want ingress routing.
  • image and image_from_build are mutually exclusive per service.