Medusa Deploy

I’m having this error and I dont know how to solve it, I have been trying to deploy this for the last three days. Have anyone ever deployed a medusa project here?
This is the error

WARNING The app is not listening on the expected address and will not be reachable by fly-proxy.
You can fix this by configuring your app to listen on the following addresses:
  - 0.0.0.0:9000d lease for 2865904c019e78
Found these processes inside the machine with open listening sockets:
  PROCESS        | ADDRESSES                             
-----------------*---------------------------------------
  /.fly/hallpass | [fdaa:11:e92a:a7b:5c:4c7c:5e43:2]:22

This is my dockerfile

# Use an official Node runtime as a parent image
FROM node:22.14.0-alpine

# Set the working directory in the container
WORKDIR /app

# Copy package.json and package-lock.json
COPY package*.json ./

# Install dependencies
RUN corepack enable && \
    npm install -g npm@11.2.0 @medusajs/medusa-cli && \
    yarn install

# Copy the rest of your Medusa application's source code
COPY . .

# Build the Medusa application
RUN npx medusa build

# Expose the port Medusa runs on
EXPOSE 9000

# Set environment variable
ENV NODE_ENV=production

# Run the Medusa server
CMD ["npx", "medusa", "start", "-H", "0.0.0.0", "-p", "9000"]

logs would help.

Normally, an app either quickly starts successfully, dies immediately, or is listening on the wrong port. None of these seem to be happening here.

So your app is either stuck, or is taking a while starting up but will eventually do so. If your app is known to take a long time starting, you can adjust your grace period: App configuration (fly.toml) · Fly Docs

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.