Skip to content

Commit

Permalink
move dockerfiles to docker folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Maiykol committed Feb 7, 2024
1 parent 5e095e5 commit efdeb07
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 117 deletions.
32 changes: 0 additions & 32 deletions Dockerfile

This file was deleted.

23 changes: 0 additions & 23 deletions Dockerfile.development

This file was deleted.

30 changes: 0 additions & 30 deletions Dockerfile.local

This file was deleted.

32 changes: 0 additions & 32 deletions Dockerfile.production

This file was deleted.

24 changes: 24 additions & 0 deletions docker/Dockerfile.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM node:16.17 as build-stage

WORKDIR /app

COPY package*.json ./
RUN npm install -g n
RUN n 16.17.1
RUN npm install
COPY ./ .
RUN rm -rf nginx

COPY ./src/environments/environment.development.ts ./src/environments/environment.ts

RUN npm run build -- --base-href=/caddie_dev/ --output-path=./dist/caddie-frontend

FROM nginx:mainline-alpine

RUN apk update && apk add --upgrade apk-tools && apk upgrade --available

COPY --from=build-stage /app/dist/caddie-frontend/ /usr/share/nginx/html/caddie/

COPY nginx/default.conf /etc/nginx/conf.d/

EXPOSE 80
24 changes: 24 additions & 0 deletions docker/Dockerfile.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM node:16.17 as build-stage

WORKDIR /app

COPY package*.json ./
RUN npm install -g n
RUN n 16.17.1
RUN npm install
COPY ./ .
RUN rm -rf nginx

COPY ./src/environments/environment.local.ts ./src/environments/environment.ts

RUN npm run build -- --base-href=/caddie/ --output-path=./dist/caddie-frontend

FROM nginx:mainline-alpine

RUN apk update && apk add --upgrade apk-tools && apk upgrade --available

COPY --from=build-stage /app/dist/caddie-frontend/ /usr/share/nginx/html/caddie/

COPY nginx/default.conf /etc/nginx/conf.d/

EXPOSE 80
24 changes: 24 additions & 0 deletions docker/Dockerfile.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM node:16.17 as build-stage

WORKDIR /app

COPY package*.json ./
RUN npm install -g n
RUN n 16.17.1
RUN npm install
COPY ./ .
RUN rm -rf nginx

COPY ./src/environments/environment.production.ts ./src/environments/environment.ts

RUN npm run build -- --base-href=/caddie/ --output-path=./dist/caddie-frontend

FROM nginx:mainline-alpine

RUN apk update && apk add --upgrade apk-tools && apk upgrade --available

COPY --from=build-stage /app/dist/caddie-frontend/ /usr/share/nginx/html/caddie/

COPY nginx/default.conf /etc/nginx/conf.d/

EXPOSE 80

0 comments on commit efdeb07

Please sign in to comment.