Azure Web App failing

Ayushi Soni (Contractor) 0 Reputation points
2024-11-26T10:33:32.9933333+00:00

Please Help me with the following -
I have been trying to deploy my reactjs application on Azure Web App using GitHub actions.

While I have been trying to deploy, though the deployment is successful, but however my application isnt running and I am getting error on the Log Stream for the particular Web App.

My App have been deployed on PORT 8080 -
in Package.json

  "scripts": {
    "start": "cross-env PORT=8080 react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },

in Dockerfile

# Use an official Node.js runtime as a parent image
FROM node:14

# Set the working directory
WORKDIR /app

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

# Install dependencies
RUN npm install

# Copy the rest of the application code
COPY . .

# Build the React app
RUN npm run build

# Serve the React app using a simple server
RUN npm install -g serve
CMD ["serve", "-s", "build"]

# Expose the port the app runs on
EXPOSE 8080

User's image

And I have also tested it on localhost and have got the response.

But upon deployment below are the log

Following Measures Taken:

  1. Startup Command set to "npm start"
  2. Configured the port - Application settings
    SCM_DO_BUILD_DURING_DEPLOYMENT = 1
    WEBSITES_PORT = 8080
  3. Restarted the App Service
  4. Checked Networking Settings
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,084 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,020 questions
{count} votes

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.