Deploying the Ballerina integration example in a Docker container

风流意气都作罢 提交于 2019-12-01 09:20:32

The piece on copying the config file is missing there. Try adding the @docker:CopyFiles annotation as well. The following worked for me:

@docker:Config {
    registry:"registry.hub.docker.com",
    name:"helloballerina",
    tag:"v1.0"
}
@docker:CopyFiles {
    files: [{source: "./twitter.toml", target: "/opt/twitter.toml", isBallerinaConf: true}]
}
endpoint http:Listener tweetEP {
    port: 9090
};

Here, I have opted to use /opt as the directory to place the config file. You can specify a path you want in the container. The isBallerinaConf field is to specify whether the file to be copied is a configuration file or not.

For more info, refer to the API docs of the ballerinax/docker package.

Ballerina Quick-tour page is updated with relevant information now.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!