Recipes
Docker
An introduction on how to deploy Seyfert in a Docker container
This guide assumes you have knowledge of the following topics:
Why Docker?
Docker provides a consistent environment that ensures the proper functioning of any bot in both development and production, as well as simplifying the integration with CI/CD tools.
With Docker scaling a bot horizontally is simple, allowing workloads to be distributed across multiple instances as needed.
What files does a Seyfert project require?
package.json
seyfert.config.mjs
/node_modules
/src
or/dist
Deploying with Node.js
Container file for a TypeScript project
A basic container file looks as follows:
You must replace <VERSION_TAG>
with the Node.js version you want to use.
Container file with multi-stage builds
Although the previous container image is simple and practical, it can still be improved by adding multi-stage builds and other best practices: