diff --git a/.github/workflows/on_push_branch_execute_ci.yml b/.github/workflows/on_push_branch_execute_ci.yml index 0a06167..0ded34f 100644 --- a/.github/workflows/on_push_branch_execute_ci.yml +++ b/.github/workflows/on_push_branch_execute_ci.yml @@ -21,7 +21,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} - cache: 'yarn' + cache: "yarn" - run: yarn install --frozen-lockfile - run: yarn test:ci @@ -34,7 +34,19 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} - cache: 'yarn' + cache: "yarn" - run: yarn install --frozen-lockfile - run: yarn lint + yarn_build: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + cache: "yarn" + - run: yarn install --frozen-lockfile + - run: yarn build:prod diff --git a/Dockerfile b/Dockerfile index ecee817..85fe0c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20.12-bookworm as base +FROM node:18-bookworm as base USER node WORKDIR /home/node/app @@ -24,22 +24,18 @@ RUN yarn install FROM base as production_builder -USER node +USER root + +# Copy project files into the docker image +COPY --chown=node:node . ./ # Install app dependencies -COPY package.json /a -COPY --chown=node:node package.json yarn.lock ./ RUN yarn install -# Copy project files into the docker image -COPY . ./ RUN yarn build:prod -FROM nginx:alpine as production - -## Remove default nginx website -RUN rm -rf /usr/share/nginx/html/* +FROM nginxinc/nginx-unprivileged:stable-alpine AS production ## From 'builder' copy website to default nginx public folder COPY --from=production_builder /home/node/app/www /usr/share/nginx/html -EXPOSE 80 + CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/src/app/pages/animator/animator.module.ts b/src/app/pages/animator/animator.module.ts index 683b485..d5e963e 100644 --- a/src/app/pages/animator/animator.module.ts +++ b/src/app/pages/animator/animator.module.ts @@ -1,4 +1,4 @@ -import { NgModule } from '@angular/core'; +import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { ComponentsModule } from '@components/components.module'; import { AnimatorPage } from './animator.page'; @@ -66,6 +66,7 @@ const MODALS = [ } ]) ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], providers: [...GUARDS], declarations: [...COMPONENTS, ...MODALS, AnimatorPage], exports: [...COMPONENTS]