diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a511ee5..425d693 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,4 +38,23 @@ jobs: run: npm install - name: Run build command - run: npm run build + run: npm run build-prod + + build-docker: + needs: [build-dotnet, build-npm] + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Build the Docker image + run: docker build ./Foodie --tag foodie:$(date +%s) + + build-nginx: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Build the Docker image + run: docker build ./nginx -f ./nginx/Nginx.Dockerfile --tag reverseproxy:$(date +%s) diff --git a/Foodie/.dockerignore b/Foodie/.dockerignore index 28fddf6..25f20fd 100644 --- a/Foodie/.dockerignore +++ b/Foodie/.dockerignore @@ -1,4 +1,4 @@ -bin\ -obj\ +bin/ +obj/ .git -ClientApp\node_modules\ \ No newline at end of file +ClientApp/node_modules/ \ No newline at end of file diff --git a/Foodie/ClientApp/angular.json b/Foodie/ClientApp/angular.json index a6be8a1..9ee7cdd 100644 --- a/Foodie/ClientApp/angular.json +++ b/Foodie/ClientApp/angular.json @@ -39,7 +39,6 @@ "optimization": true, "outputHashing": "all", "sourceMap": false, - "extractCss": true, "namedChunks": false, "aot": true, "extractLicenses": true, diff --git a/Foodie/ClientApp/package.json b/Foodie/ClientApp/package.json index 6b6cae1..3e033ff 100644 --- a/Foodie/ClientApp/package.json +++ b/Foodie/ClientApp/package.json @@ -5,7 +5,9 @@ "ng": "ng", "start": "ng serve", "build": "ng build", + "build-prod": "ng build --configuration production", "build:ssr": "ng run Foodie:server:dev", + "build-prod:ssr": "ng run Foodie:server:production", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", diff --git a/Foodie/Dockerfile b/Foodie/Dockerfile index 9ceb8fe..d9f8740 100644 --- a/Foodie/Dockerfile +++ b/Foodie/Dockerfile @@ -1,7 +1,7 @@ FROM mcr.microsoft.com/dotnet/core/sdk:3.0 AS build-env RUN apt-get update -yq \ && apt-get install curl gnupg -yq \ - && curl -sL https://deb.nodesource.com/setup_10.x | bash \ + && curl -sL https://deb.nodesource.com/setup_18.x | bash \ && apt-get install nodejs -yq WORKDIR /app diff --git a/Foodie/Foodie.csproj b/Foodie/Foodie.csproj index 300fdad..d885613 100644 --- a/Foodie/Foodie.csproj +++ b/Foodie/Foodie.csproj @@ -47,8 +47,8 @@ - - + +