How to deploy Shopify Remix app on Azure?

Amit Developer- Atlantic 20 Reputation points
2025-06-11T07:31:32.1433333+00:00

I’ve developed a Shopify Remix app using the Shopify CLI and am now looking to deploy it to Microsoft Azure. However, I haven’t been able to find comprehensive documentation on this specific process.

Could anyone provide guidance or share the necessary steps to deploy a Shopify Remix app on Azure?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,932 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Prabhavathi Manchala 2,315 Reputation points Microsoft External Staff Moderator
    2025-06-11T12:33:51.5333333+00:00

    Hi Amit Developer- Atlantic,

    Here’s a clear step-by-step guide to help you deploy your Shopify Remix app to Azure.

    Option 1: Azure App Service using Docker for a production-ready setup

    1). Create a Dockerfile in your Remix project's root, using Shopify’s starter as a reference

    FROM node:18-alpine
    WORKDIR /app
    COPY package*.json ./
    RUN npm ci
    COPY . .
    RUN npm run build
    EXPOSE 3000
    CMD ["npm", "run", "start"]
    

    2). Develop and test on your local machine

    docker build -t my-remix-app .
    docker run -p 3000:3000 my-remix-app
    

    3). Create an Azure Container Registry (ACR) and push your image to it

    az acr create --name myRegistry --sku Basic --resource-group myRG
    az acr login --name myRegistry
    docker tag my-remix-app myRegistry.azurecr.io/my-remix-app:latest
    docker push myRegistry.azurecr.io/my-remix-app:latest
    

    4). Deploy to Azure App Service

    In the Azure Portal: create a Web App (Linux) → under Publishing choose "Docker Container" → point to your image in ACR or use the CLI to do the same.

    az webapp create \
      --resource-group myRG \
      --plan myPlan \
      --name myRemixApp \
      --deployment-container-image-name myRegistry.azurecr.io/my-remix-app:latest
    

    5). Configure settings: Add keys like SHOPIFY_API_KEY, SHOPIFY_API_SECRET, SCOPES, SHOPIFY_APP_URL, and WEBSITES_PORT/PORT=3000 in the Configurations → Application settings.

    6). Deploy your Shopify app config

    shopify app config deploy --env production
    

    Build and run custom image in App Service

    Run a custom container on App Service

    Option 2: Azure Container Apps with GitHub Actions for automated CI/CD

    1). Provision your infrastructure locally or using Bicep/CLI templates

    az group create -n myRG -l eastus
    az acr create -n myRegistry --sku Basic -g myRG
    az containerapp env create -n myEnv -g myRG --location eastus
    az containerapp create -n myRemixApp -g myRG \
      --environment myEnv \
      --image myRegistry.azurecr.io/my-remix-app:latest \
      --ingress 'external' \
      --target-port 3000
    

    2). Grant permissions

    az containerapp identity assign --name myRemixApp -g myRG
    ACR_ID="$(az acr show -n myRegistry -g myRG --query id -o tsv)"
    PRINCIPAL_ID="$(az containerapp show -n myRemixApp -g myRG --query identity.principalId -o tsv)"
    az role assignment create --assignee $PRINCIPAL_ID --role AcrPull --scope $ACR_ID
    

    3). Add GitHub secrets

    AZURE_CREDENTIALS: JSON from az ad sp create-for-rbac --role contributor …

    Azure resource details: ACR_NAME, RESOURCE_GROUP, CONTAINERAPP_NAME, ENVIRONMENT_NAME
    4). Use a GitHub Actions workflow (e.g., .github/workflows/deploy.yml) to automate your deployment.

    name: Deploy to Azure Container Apps
    on: [push]
    jobs:
      deploy:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v3
          - name: Azure login
            uses: azure/login@v1
            with: creds: ${{ secrets.AZURE_CREDENTIALS }}
          - name: Build & Deploy
            uses: azure/container-apps-deploy-action@v1
            with:
              appSourcePath: .
              acrName: ${{ secrets.ACR_NAME }}
              containerAppName: ${{ secrets.CONTAINERAPP_NAME }}
              resourceGroup: ${{ secrets.RESOURCE_GROUP }}
              environmentName: ${{ secrets.ENVIRONMENT_NAME }}
    

    On each push to main, GitHub Actions builds your Docker image, pushes it to ACR, and updates your Container App.

    Azure Container Apps with GitHub Actions

    If you're new to Azure, choose Option 1 for a quick setup, or Option 2 if you want automated deployments with each code change.

    Please accept as "Yes" if the answer provided is useful, so that you can help others in the community looking for remediation for similar issues.

    Let me know if you have any further Queries.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.