Commit cee4ad2c authored by Philipp Rummelsberger's avatar Philipp Rummelsberger

add nginx docker build

parent 35b5422a
FROM nginx:alpine
FROM node:10-alpine as build
COPY ./web/dist/apps/foo /usr/share/nginx/html
COPY web/package-lock.json web/package.json web/angular.json web/nx.json web/tsconfig.json /app/build/
COPY web/apps/foo /app/build/apps/foo
WORKDIR /app/build/
RUN npm install
RUN npm install @angular/cli -g
RUN ng build foo --prod
FROM nginx
COPY --from=build /app/build/dist/apps/foo /usr/share/nginx/html
import { Component } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Message } from '@foo/api-interfaces';
selector: 'foo-root',
......@@ -8,7 +7,7 @@ import { Message } from '@foo/api-interfaces';
styleUrls: ['./app.component.scss']
export class AppComponent {
hello$ = this.http.get<Message>('/api/hello');
hello$ = this.http.get<string>('/api/hello');
constructor(private http: HttpClient) {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment