Run
Configuration Overlays
Learn how to use Configuration Overlays
Before reading this document about how to use configuration overlays with Run services make sure you are familiar with the concept of configuration overlays and how they work.
Working with configuration overlays with Run services is very similar to working with them in the Nhost stack. There are a few differences though:
- Commands to work with the configuration are located under
nhost run config-...
, for instance:
- Unless explicitly indicated by the help of the command, overlays are never applied automatically, a flag needs to be used to apply the overlay:
- A notable exception of the point above is
nhost run config-deploy --service-id SERVICE_ID
, which, as indicated by the help, will apply automatically the overlay with nameSERVICE_ID
if it exists:
- Overlays will be located under the same base path as the specified configuration file, under
nhost/overlays
and prefixed withrun-
. If you are using the commandnhost run config-show --config ../mysvc/nhost-run-service.toml --overlay-name mysvc
to edit overlays this is handled by you and you don’t need to be worried about. For instance:
- When running
nhost up --run-service ...
no overlay will be applied automatically. If you want to apply an overlay you will need to specify the name of the overlay name to apply by prefixing the path with:overlay_name
, for instance:nhost up --run-service ../mysvc/nhost-run-service.toml:mysvc