Can anybody guide me on how to dockerize remix app?

can anyone help me to dockerize shopify app built using remix and install it on a dev store?

Hi @Sujan_Pandey

I’m not sure which step you’re stuck on. Below are the contents of my Dockerfile and docker-compose file; I hope they are helpful to you.

Dockerfile:

# Stage 1: Build
FROM node:20-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build

# Stage 2: Production
FROM node:20-alpine
EXPOSE 3000
WORKDIR /app
ENV NODE_ENV=production
COPY package.json package-lock.json ./
RUN npm ci --omit=dev && npm cache clean --force
COPY --from=build /app/build ./build
COPY --from=build /app/prisma ./prisma
CMD ["npm", "run", "docker-start"]

docker-compose.yml

services:
  app:
    build: .
    ports:
      - "3000:3000"
    env_file:
      - .env.docker
    restart: unless-stopped
    networks:
      - default
      - mongoNetwork

networks:
  mongoNetwork:
    external: true
    name: mongos_mongoNetwork

Yes, I can help with that.

I have experience working with Shopify Remix apps, including Dockerizing the application, configuring environment variables, setting up Docker Compose if needed, and deploying/installing the app on a Shopify development store.

This would typically include:

  • Creating an optimized Dockerfile
  • Handling Shopify app environment configuration
  • Configuring Prisma/database setup if used
  • Running the Remix app correctly inside Docker
  • Setting up webhook/auth callback URLs
  • Installing and testing the app on a Shopify dev store
  • Assisting with deployment if required (Railway, Render, VPS, AWS, etc.)

If you’d like, you can share:

  • Your current project structure/repository
  • Hosting target
  • Whether you are using Prisma/MySQL/Postgres/SQLite
  • Current issues or errors you’re facing

Then I can guide you through the setup or help implement it directly.

@Airton_Gomes
I have used ngrok for tunneling.
after i run app container and install app using this url
.

https://elevation-dingo-wafer.ngrok-free.dev/auth?shop=(shopname).myshopify.com

it shows UI like this .

How did you install the app on development store after this?

You can reply professionally like this:

The UI shown in the screenshot usually means the request is reaching a default/example response instead of your Shopify Remix app.

Most commonly, this happens because:

  • The ngrok tunnel is pointing to the wrong port
  • The Docker container is not exposing the correct application port
  • The Remix app inside the container is not running properly
  • The HOST / SHOPIFY_APP_URL environment variable is misconfigured
  • The auth callback route is not being served correctly

For Shopify Remix apps, please verify:

  1. Your app is actually running inside Docker
docker ps
  1. The container port mapping is correct
    Example:
-p 3000:3000
  1. Ngrok is tunneling the same port your Remix app uses
    Example:
ngrok http 3000
  1. Your .env contains the ngrok URL
    Example:
SHOPIFY_APP_URL=https://elevation-dingo-wafer.ngrok-free.dev
HOST=https://elevation-dingo-wafer.ngrok-free.dev
  1. After changing the URL, run:
shopify app config link
shopify app dev

or restart the container completely.

Also make sure the app URL and redirect URLs in the Shopify Partner Dashboard exactly match the ngrok domain.

The “Example Domain” page strongly suggests that the request is not reaching your Remix server correctly yet.

You can reply professionally like this:

After the Docker container and ngrok tunnel were working correctly, I installed the app on the development store using the standard Shopify OAuth install flow.

The general process was:

  1. Start the Remix app inside Docker
docker compose up
  1. Start ngrok on the same exposed port
ngrok http 3000
  1. Update the app URLs with the ngrok domain:
  • App URL
  • Allowed redirection URLs
  • SHOPIFY_APP_URL
  • HOST
  1. Restart the app/container after updating environment variables.

  2. Open the install URL in the browser:

https://your-ngrok-url.ngrok-free.dev/auth?shop=your-store.myshopify.com
  1. Shopify then redirects through OAuth:
  • /auth
  • /auth/callback
  1. After successful authentication, the app gets installed on the dev store automatically.

If the install flow instead shows “Example Domain”, blank pages, or 404s, it usually means:

  • OAuth callback URL mismatch
  • Container app not reachable
  • Wrong ngrok port
  • Remix server not running
  • Incorrect reverse proxy/Docker networking setup

For Shopify Remix apps running in Docker, the most important part is making sure the callback URL from Shopify can successfully reach the Remix server through ngrok.

Thankyou for your help. @Airton_Gomes

@Sujan_Pandey

You are welcome.
then I have one question.

Are you developer? or?

Yes I am a developer.
@Airton_Gomes

Oh, great
I think that we can collaborate after some times.

@Sujan_Pandey

Sounds good! I’d be happy to collaborate with you.
@Airton_Gomes

Okay, sounds good.
May I know about your m-ail?

@Sujan_Pandey
Okay, good
:+1: