Hello World App
This minimal app demonstrates the smallest deployment that still exercises builds, a service, and ingress routing.
- Define the app name.
- Create a build that defines how a container image is produced.
- Declare a service with
image_from_build(orimage) and expose a port. - 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.
imageandimage_from_buildare mutually exclusive per service.