-
Notifications
You must be signed in to change notification settings - Fork 7
Dockerize robot runtime #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I typically don't use Docker, so I'm relying on friends for feedback here, but overall I think this is a good idea. I meant to eventually include an example systemd unit file that would show another approach to something like this, but it slipped my mind – filed #84. (And, as I mentioned on #76, I still plan to make changes soon which will substantially change some parts of setup. Probably sometime this week I will be making incompatible changes to the config file structure.)
@zephyrtronium I've been thinking of adding the docker-compose.yml back, but maybe just renaming it as a docker-compose.example.yaml maybe for simplicity sake to show the file imports that would be expected Or do you think it's better without? |
When doing
By ignoring those files/folders the cache doesn't get invalidated when they change |
Thanks for keeping on this while I've been quiet.
I think if we put a Dockerfile in the repo, it probably should be for the purpose of publishing to a container registry via CI/CD. The Dockerfile now isn't trivial, but it's ultimately still just "build it the normal way, then run it the normal way;" it's probably what a relatively advanced user would write themselves if they wanted to containerize Robot. So, I don't feel a strong need to have it in the repo itself if not for eventual CI/CD; putting it e.g. in the wiki with a link from the README would be fine. That said, I don't know the costs or detriments of publishing to a container registry. (Is there a self-hosted container registry I could put on my home server for this, maybe?) To be clear, I'm saying that I intend to look into publishing a container. I really appreciate your work here @seth-rah, and I want to do what I can to make the best possible use of it. With that in mind, I have a few questions:
|
It's worth noting my docker knowledge is not perfect, my use cases have been quite primitive in the past and mostly just being used for hobbies and a little bit at work, so @topi314 might be able to shed light on any mistakes I might have made with my explanations. |
I honestly recommend to just publish it to the github container repo (ghcr.io), it's integrated into github and very easy to use. There are selfhostable alternatives too.
services:
robot:
...
command: -config /robot.toml -log-format=json
...
services:
robot:
...
command: -config /robot.toml speak -tag=bocchi
... edit: not sure how the sub commands work, do you call them at bot runtime? or startup? |
Thanks! |
Dockerize a prepared robot environment
Requires that you've already set up all your configuration / secrets / database files beforehand
I wanted an easy way to restart robot daily in case the session expires using cron, and running robot in a docker-daemon was my way of going about it, seemed like a waste to just keep the configuration to myself