Se recurre a usar imagenes pre-compiladas para evitar carga en el
servidor
This commit is contained in:
BIN
builds/unified-restaurant-backend.tar.gz
Normal file
BIN
builds/unified-restaurant-backend.tar.gz
Normal file
Binary file not shown.
BIN
builds/unified-restaurant-frontend.tar.gz
Normal file
BIN
builds/unified-restaurant-frontend.tar.gz
Normal file
Binary file not shown.
@@ -2,16 +2,12 @@ version: "3.9"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
backend:
|
backend:
|
||||||
build:
|
image: unified-restaurant-backend
|
||||||
context: ./backend
|
|
||||||
dockerfile: ./Dockerfile.prod
|
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
build:
|
image: unified-restaurant-frontend
|
||||||
context: ./frontend
|
|
||||||
dockerfile: ./Dockerfile.prod
|
|
||||||
ports:
|
ports:
|
||||||
- 4200:80
|
- 4200:80
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ WORKDIR /angular
|
|||||||
COPY package.json package-lock.json /angular/
|
COPY package.json package-lock.json /angular/
|
||||||
RUN npm install
|
RUN npm install
|
||||||
COPY . /angular
|
COPY . /angular
|
||||||
RUN npm run prod
|
RUN npm run build
|
||||||
|
|
||||||
FROM nginx:stable-alpine
|
FROM nginx:stable-alpine
|
||||||
COPY --from=build /angular/dist/frontend /usr/share/nginx/html
|
COPY --from=build /angular/dist/frontend /usr/share/nginx/html
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
"start": "ng serve --host 0.0.0.0",
|
"start": "ng serve --host 0.0.0.0",
|
||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
"watch": "ng build --watch --configuration development",
|
"watch": "ng build --watch --configuration development",
|
||||||
"prod": "node --max_old_space_size=500 ./node_modules/@angular/cli/bin/ng build",
|
|
||||||
"test": "ng test"
|
"test": "ng test"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user