damp-manchester-26851
05/26/2024, 11:26 AMmicroscopic-river-74022
05/26/2024, 11:26 AMmicroscopic-river-74022
05/26/2024, 11:26 AMcontainer build action. In your garden.yml file, you would specify a Build action of type container, and then a Deploy action to deploy your application.
Here's an example of how you might set up your garden.yml file:
yaml
# backend/garden.yml
kind: Build
type: exec
buildAtSource: true
...
spec:
command: [go, build, -o, bin/backend]
---
kind: Build
type: container
dependencies:
- build.builder
copyFrom:
- build: builder
sourcePath: bin
targetPath: .
...
In this example, the exec build action is used to compile the Go application, and the resulting binary is then added to the container image by the container build action. The buildAtSource: true option is used to run the build command in the action directory, rather than the default .garden/build directory.
To deploy your application, you can use the garden deploy command. This will build and deploy your application according to the configuration in your garden.yml file.
For more detailed information, you can refer to the Garden documentation () and the example project () provided in the knowledge sources.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------microscopic-river-74022
05/26/2024, 11:27 AM