This page contains information about changes between each versions and how you can migrate from one version to another.

Morph 0.1.9 to 0.2.0

Dockerfile Update: CMD Command Changes

The method for installing the execution command for apps built with Morph in the deployment environment has changed for the Github integration. Specifically, it has changed from copying the api/app.py file in the .morph/core/morph directory created in the local environment to the deployment environment, to executing files installed as a package. As a result, the entry point in the dockerfile has also changed for v0.2.0 and later when executing morph deploy.

With the v0.2.0 changes, the CMD command generated by the morph new command in the Dockerfile has been updated, so if you are using previous versions, please update your CMD command.

# Base image for Morph Cloud
FROM public.ecr.aws/i1l4z0u0/morph-data:python3.9

# Set working directory
WORKDIR /var/task

# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt --target "${MORPH_PACKAGE_ROOT}"

# Copy source code and dependencies
COPY . .

# Command to run the Lambda function
CMD python "${MORPH_APP_FILE_PATH}"

Adding the /static Directory

In v0.2.0, a /static directory was added to host static files. Files placed under /static can be accessed from the frontend application.

# Example of displaying an image file placed in the `/static` directory

![Logo](/static/logo.png)

If you are using a previous version, please create the /static directory.

Morph 0.1.7 to 0.1.8

Dockerfile Update: Improved Streaming for <LLM /> and <Chat /> Components

Due to improvements in LLM streaming response behavior, the base image and CMD settings in the Dockerfile have been updated.

For v0.1.8 and later, the Dockerfile generated by the morph new command will be initialized with the following structure:

# Base image for Morph Cloud
FROM public.ecr.aws/i1l4z0u0/morph-data:python3.9

# Set working directory
WORKDIR /var/task

# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt --target "${MORPH_TASK_ROOT}"

# Copy source code and dependencies
COPY . .

# Command to run the Lambda function
CMD ["python", ".morph/core/morph/api/app.py"]

Additionally, a .dockerignore file is now generated during initialization, and the COPY command has been modified to copy the entire directory while excluding files specified in .dockerignore, rather than copying individual files.

This means you no longer need to update the Dockerfile when the directory structure changes in your local development environment.