diff --git a/.dockerignore b/.dockerignore index ad13f4a..fe35bf2 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ +.idea/ node_modules/ vendor/ bin/ \ No newline at end of file diff --git a/cmd/nginx/Dockerfile b/cmd/nginx/Dockerfile index 3265226..6ff8810 100644 --- a/cmd/nginx/Dockerfile +++ b/cmd/nginx/Dockerfile @@ -1,9 +1,9 @@ # Build fronend FROM node:11-slim AS builder -WORKDIR /app -COPY . . +WORKDIR /work +COPY ui/ . RUN npm install -RUN npm run build +RUN npm run build -- --prod --aot # Build nginx to host static files FROM nginx:stable @@ -11,6 +11,4 @@ FROM nginx:stable COPY cmd/nginx/podsync.conf /etc/nginx/nginx.conf COPY cmd/nginx/robots.txt /var/www/podsync/ -COPY --from=builder /app/dist/html/ /var/www/podsync/ -COPY --from=builder /app/dist/assets/ /var/www/podsync/assets/ -COPY /assets/favicon.ico /var/www/podsync/ +COPY --from=builder /work/dist/ui/ /var/www/podsync/ diff --git a/ui/angular.json b/ui/angular.json index d4580cf..5f9aba3 100644 --- a/ui/angular.json +++ b/ui/angular.json @@ -3,7 +3,7 @@ "version": 1, "newProjectRoot": "projects", "projects": { - "ui": { + "podsync": { "projectType": "application", "schematics": { "@schematics/angular:component": { @@ -119,5 +119,5 @@ } } }}, - "defaultProject": "ui" -} \ No newline at end of file + "defaultProject": "podsync" +}