Merge branch 'master' into matias

This commit is contained in:
2021-07-14 01:25:23 -04:00
15 changed files with 465 additions and 64 deletions

View File

@@ -1,11 +1,8 @@
FROM node:14-alpine
FROM node:alpine as build
WORKDIR /angular
COPY package.json /angular
COPY package.json package-lock.json /angular/
RUN npm install
COPY . /angular
ENTRYPOINT ["/angular/node_modules/@angular/cli/bin/ng", "serve", "--host", "0.0.0.0"]
ENTRYPOINT ["npm", "run", "start"]

10
frontend/Dockerfile.prod Normal file
View File

@@ -0,0 +1,10 @@
FROM node:alpine as build
WORKDIR /angular
COPY package.json package-lock.json /angular/
RUN npm install
COPY . /angular
RUN npm run build --prod
FROM nginx:stable-alpine
COPY --from=build /angular/dist/frontend /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf

8
frontend/nginx.conf Normal file
View File

@@ -0,0 +1,8 @@
server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
}

View File

@@ -3,7 +3,7 @@
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"start": "ng serve --host 0.0.0.0",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"