Dejando el servicio de frontend estatico
This commit is contained in:
@@ -25,16 +25,7 @@ services:
|
|||||||
context: ./frontend
|
context: ./frontend
|
||||||
dockerfile: ./Dockerfile
|
dockerfile: ./Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- 4200:4200
|
- 4200:80
|
||||||
volumes:
|
|
||||||
- ./frontend/src:/angular/src
|
|
||||||
- ./frontend/karma.conf.js:/angular/karma.conf.js
|
|
||||||
- ./frontend/angular.json:/angular/angular.json
|
|
||||||
- ./frontend/tsconfig.app.json:/angular/tsconfig.app.json
|
|
||||||
- ./frontend/tsconfig.json:/angular/tsconfig.json
|
|
||||||
- ./frontend/tsconfig.spec.json:/angular/tsconfig.spec.json
|
|
||||||
- ./frontend/.editorconfig:/angular/.editorconfig
|
|
||||||
- ./frontend/.browserslistrc:/angular/.browserslistrc
|
|
||||||
|
|
||||||
database:
|
database:
|
||||||
image: postgres:13
|
image: postgres:13
|
||||||
|
|||||||
@@ -1,14 +1,9 @@
|
|||||||
FROM node:14-alpine
|
FROM node:alpine as build
|
||||||
|
|
||||||
WORKDIR /angular
|
WORKDIR /angular
|
||||||
|
COPY package.json package-lock.json /angular/
|
||||||
COPY package.json /angular
|
RUN npm install
|
||||||
COPY package-lock.json /angular
|
|
||||||
|
|
||||||
ENV NODE_OPTIONS="--max_old_space_size=400"
|
|
||||||
|
|
||||||
RUN npm install --verbose
|
|
||||||
|
|
||||||
COPY . /angular
|
COPY . /angular
|
||||||
|
RUN npm run build --prod
|
||||||
|
|
||||||
ENTRYPOINT ["/angular/node_modules/@angular/cli/bin/ng", "serve", "--host", "0.0.0.0"]
|
FROM nginx:stable-alpine
|
||||||
|
COPY --from=build /angular/dist/frontend /usr/share/nginx/html
|
||||||
|
|||||||
Reference in New Issue
Block a user