- Select Create Component with
Service
type. - Provide component name and description.
- Select
Deploy an image from a Container Registry
as the source. - Select
User Service
tile and create component.
- Endpoint Yaml - endpoints.yaml
- OpenAPI - openapi.yaml
- Build Pack: Dockerfile
- Dockerfile Path:
docker-rest-user-service/Dockerfile
- Docker Context Path:
docker-rest-user-service
The endpoints.yaml file contains the endpoint configurations that are used by the Choreo to expose the service.
go run main.go
Generated using Go annotations https://github.com/swaggo/swag
- Download swag CLI tool by running:
go install github.com/swaggo/swag/cmd/[email protected]
- Run the following command to generate the API definitions:
swag fmt && swag init
Refer config.go file for the available configurations.
For more information on how to configure a service in Choreo, refer Manage Configurations and Secrets documentation.
- Set environment variable by navigating to Choreo Deploy page
INIT_DATA_PATH=configs/initial_data.json
- Mount the file contents of
configs/initial_data.json
in the path specified in step 1.
See initial_data.json for a sample file.