New Docker Image for Building/Executing Bots Running Against the Steem Platform
docker-steem-bot
Base docker image for building steem bots. The purpose is to
- Allow easy installation/execution of bots
- Simple development/deployment of bots
- Established conventions for bot development
- Provide sandbox environments for nodejs steembots to run in
This is a base image. New bot projects can be easily created using this base image.
Usage
It's intended that you would use this to create a new bot following the convention laid out by this Dockerfile
Implement App
Create a nodejs app in the app/
directory that can be executed via npm start
. This is really up to you. Use the steem-bot-template as an example. Further examples will be provided in the future as well as guides on how to use.
SAO
SAO templating can be used to apply a project template.
~/s/g/r/steem-digest-example git:master ❯❯❯ sao r351574nc3/docker-steem-bot-template
warning Config file was not found, we simply copy it to dest folder!
success Done, let the hacking begin!
~/s/g/r/steem-digest-example git:master ❯❯❯ ls ✱ ◼
Dockerfile LICENSE README.md app package-lock.json package.json
Create Dockerfile
To use this base create a Dockerfile
with
FROM r351574nc3/steem-bot:latest
Build
You're done at this point. If you have a running application in app/
, and you created a Dockerfile you can now build your bot!
Note you only have to do this once. It's not necessary each time you want to run your bot.
docker build -t your-rep/your-bot-name:latest .
~/s/g/r/docker-steem-bot-template git:master ❯❯❯ docker build -t r351574nc3/test-bot:latest . ⏎ ◼
Sending build context to Docker daemon 33.53MB
Step 1/1 : FROM r351574nc3/steem-bot:latest
# Executing 3 build triggers
---> Using cache
---> Using cache
---> Using cache
---> 4c59c8c2e06f
Successfully built 4c59c8c2e06f
Successfully tagged r351574nc3/test-bot:latest
Go
Now that the image is built, we can run it.
docker run --rm -d -e STEEM_NAME=<yourname> your-rpo/your-bot-name:latest
~/s/g/r/docker-steem-bot-template git:master ❯❯❯ docker run --rm -d -e STEEM_NAME=r351574nc3 r351574nc3/test-bot:latest ⏎ ◼
153b79e399134804981b2a8ea94541549a36c4c33102f193f3aeaa08de9814a3
That's it. It's running in daemon mode. If you want to be sure that it's running:
docker ps
~/s/g/r/docker-steem-bot-template git:master ❯❯❯ docker ps ◼
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
153b79e39913 r351574nc3/test-bot:latest "npm start" 39 seconds ago Up 39 seconds 0.0.0.0:3000->3000/tcp confident_heisenberg
will show the docker containers you have running.
Roadmap
This is a small start to get some bots off the ground. In the future, there will be more complex applications available.
docker-compose Support
Includes orchestration allowing to run dependencies with a bot like:
- CouchDB
- Redis
- Kafka
- Elasticsearch
- Kibana
Golang Image
For users that want to run golang with AWS lambda and also run golang as the bot.
Source
Contributing
Contributing is really easy. We love free code. Please send it to us at https://www.github.com/r351574nc3/docker-steem-bot/pulls
Issues
At this time, there isn't a template for issues or anything like that. Just submit whatever your problem may be to https://www.github.com/r351574nc3/docker-steem-bot/issues
Contact
You can reach me on discord at r351574nc3#7016
Posted on Utopian.io - Rewarding Open Source Contributors
@purepinay Thanks
Moar like this!
This post has received a 0.77% upvote from thanks to: @r351574nc3.
For more information, click here!!!!
Send minimum 0.100 SBD to bid for votes.
Do you know, you can also earn daily passive income simply by delegating your Steem Power to @minnowhelper by clicking following links: 10SP, 100SP, 500SP, 1000SP or Another amount
This post has received a 4.04 % upvote from @booster thanks to: @r351574nc3.
This post has received a 11.11 % upvote from @moneymatchgaming thanks to: @r351574nc3. Upvote this Post to Support the MMG Community on Steemit! :)
Your contribution cannot be approved because it does not follow the Utopian Rules.
Your Dockerfile contains very common code which cannot be accepted as a valid contribution.
You can contact us on Discord.
[utopian-moderator]
You got a 1.92% upvote from @bid4joy courtesy of @r351574nc3!
You got a 16.67% upvote from @steembloggers courtesy of @r351574nc3!
Release the Kraken! You got a 3.90% upvote from @seakraken courtesy of @r351574nc3!
This post has received gratitude of 0.78 % from @appreciator thanks to: @r351574nc3.