I have followed the angular cli story on Integrating Angular Universal into existing CLI…
I have followed the angular cli story on Integrating Angular Universal into existing CLI Applications
Created Dockerfile
FROM nginx:1.13-alpine
ENV APP_PATH /app
ENV PATH $APP_PATH/node_modules/@angular/cli/bin/:$PATH
RUN apk add --update --no-cache nodejs && mkdir $APP_PATH && rm -rf /etc/nginx/conf.d/*
WORKDIR $APP_PATH
COPY . .
COPY nginx/default.conf /etc/nginx/conf.d/
RUN npm install \
&& npm run build:ssr \
&& rm -rf /usr/share/nginx/html/* \
&& npm cache clean
EXPOSE 4000
CMD ["npm", "run", "serve:ssr"]
Created image with following
docker build -t .
Created docker-compose.yml
version: '2'
services:
gluoed:
image: :latest
ports:
- "80:4000"
RUN
docker-compose up -d
Works fine. Now i am facing new issue with CORS with serverside rendering.
Angular cli story for Proxy for COR calls works fine without server side rendering when i do with
ng server — proxy-conf conf.json
But I am unable to achieve same for serverside rendering. I am trying to call a xml url