Change how a service builds and starts
Set how one service builds and starts: the builder, root directory, build and start commands, port and health check path.
All pages
- Open the service, press ⌘K and choose Settings › Build and run.
- Edit the field you need: Build command, Run command, App port, Root directory, Readiness check path, Builder or Branch. Choose Stage change, and the edit waits as a staged change.
With the CLI:
Terminalghaym cloud services set web rootDirectory=apps/web port=8080 - Press ⌘K, choose Review changes, then press ⌘↵ to apply it.
Applying it deploys the service with the new settings.
With the CLI:
Terminalghaym cloud changes apply --project shop
- Build command runs before start on every deploy, and Run command starts the app after the build. Leave either empty and the build works it out from your repository.
- Without a
Dockerfile, the build detects the framework. Any stack builds with one: add aDockerfileto the repository and set Builder to Dockerfile. A repository that already has aDockerfilewhen you add the service gets that builder from the start. - Root directory is the folder in the repository the app builds from.
- App port is the port the app listens on, 3000 unless you change it.
- Readiness check path must answer successfully before a deploy takes visitors. Left empty, Ghaym checks
/. - Branch is the branch the service deploys from.
Each environment has its own build settings, copied from production when it was created. A value you set applies only to the environment you are in.