Dockerfile with nginx and SSR in staging environment

i am having issues with running my mean stack application in staging environment. View page source still only has empty tags. It is working great in dev environment (probably because im not using docker in dev environment).

Here is my dockerfile:

#################
# Build the app #
#################
FROM node:14.5-alpine as build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
COPY . .
RUN npm install -g @angular/cli
RUN ng build --configuration=staging && ng run bananas:server:staging

################
# Run in NGINX #
################
FROM nginx:alpine
COPY --from=build /app/dist/bananas/browser /usr/share/nginx/html
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx/nginx.conf /etc/nginx/conf.d
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

Source: Docker Questions

LEAVE A COMMENT