motiadev/motia

By motiadev

Updated 12 months ago

Provides all of the required dependencies to run a Motia application inside a Docker container.

Image
Languages & frameworks
Developer tools
0

7.2K

motiadev/motia repository overview

This repository contains the Dockerfile and related files for building the motia-docker image, which can be used to run a Motia application in a Docker container. It provides all of the required dependencies to run a Motia application inside a Docker container.

Usage

You will need to implement your own Dockerfile where you will use this image as a base image. Use the following template for your Dockerfile:

# NOTE: Some cloud providers will require you to specify the platform to match your target architecture
# i.e.: AWS Lightsail requires arm64, therefore you update your FROM statement to: FROM --platform=linux/arm64 motiadev/motia:latest
FROM motiadev/motia:latest

# Install Dependencies
COPY package*.json ./
RUN npm ci --only=production

# Move application files
COPY . .

# Enable the following lines if you are using python steps!!!
# Setup python steps dependencies
# RUN npx motia@latest install

# Expose outside access to the motia project
EXPOSE 3000

# Run your application
CMD ["npm", "run", "start"]

Create a .dockerignore file

You can use the templates/.dockerignore.sample file as a template for your .dockerignore file.

Build the image

docker build -t motia-app .

Run your Motia application

Once you've built your image, you can run it using the following command:

docker run -it --rm -p 3000:3000 motia-app

Replace the port and the name of your image accordingly this is just an example

You are set to go! Your Motia application should now be running inside a Docker container, you can access it at http://localhost:3000 (replace the port if you used a different one).

For more information please refer to our documentation

Resources

Motia Docs
Motia Repo

Tag summary

Content type

Image

Digest

sha256:067085c04

Size

209.1 MB

Last updated

12 months ago

docker pull motiadev/motia