Self-Hosted Deployment
Learn how to deploy your Motia project to production using motia-docker
We provide a docker image that you can use to deploy your Motia project to production. You can use it as a base image and add your own customizations or use it as is.
Quick setup
Reference the CLI for more information on the docker commands.
Using the docker image
You will need to implement your own Dockerfile where you will use the motia-docker image as a base image. Use the following template as a starting point for your Dockerfile:
Depending on the cloud provider you will use to deploy your Motia project, you will need to adjust the exposed ports and the command to start your application.
Create a .dockerignore file
Create a .dockerignore file in the root of your project to exclude files that are not needed in the docker image. You can use the following template as a starting point for your .dockerignore file:
Build your image
Run your Motia application
Once you've built your image, you can run it using the following command:
Motia Docker Resources
- Docker Registry
- Github Repo
- Example Motia project with deployment boilerplate for AWS LightSail and Railway