Unable to deploy my React app

OS: Windows 10
databases: MongoDB (My API is in a separate repo & no problems here)
Programming language: JavaScript/Typescript
Github: GitHub - nadjitan/mern-app-client: An application that has user login (includes google) & post creation. Users can make their own posts that contains a title, message, tags, & picture.

I tried to use codes that was used here:

Unfortunately I still get deployment errors. In my logs everything seems to build successfully but at the end I get repeating messages of “Application ‘my number (my number )’ deployment is in progress…”

Dockerfile content
FROM node:13 as build
WORKDIR /app
COPY . ./
RUN npm i --only=prod
RUN npm run build

FROM nginx:1.19.0
COPY --from=build /app/build /usr/share/nginx/html
COPY ./nginx/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD [“nginx”, “-g”, “daemon off;”]

Application deployment is in progress means that the container is built and it’s at the stage where it’s deploying. If it’s stuck there for very long, the application will fail with a deployment error. Does it do that?

If you see any errors on the console, it’s advised to run your image locally with docker and see if there are any errors.

Please let me know the outcome. Thanks!

1 Like

Although this was not really the solution, I was able to debug my application thanks to your suggestion of using the Docker desktop application.

What I did was:
Firstly, I copied the the steps here (the answer was already in my face…) and then did some tweaks on my Qovery Application.

In the settings of my application i added a Port 80 (make sure to set it to public), because in the Dockerfile there is an EXPOSE 80 so I copied the number. (unable to show image because I can only put one :frowning: )

Lastly, I configured my Build mode and Dockerfile path showed in the image below.

If anyone is interested to look on the src files just go back to my first post here there is a github link.

Additional resource for those who are new to Docker just like me:
Docker & React
I only followed up until Building our image then used the codes in my previous link (angular-app-deploy) because this one has Dockerfile codes for making production ready files which is important when deploying.

1 Like

Glad you figured it out!