From 6717e40f1625b34fa168844a39727769cd84f117 Mon Sep 17 00:00:00 2001 From: Supan Adit Pratama Date: Sat, 10 Sep 2022 14:11:31 +0700 Subject: [PATCH] feat: docker support --- Dockerfile | 10 ++++++++++ src/environments/environment.prod.ts | 4 ++-- src/environments/environment.ts | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2caaa5b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +# Stage 1 +FROM node:14.20.0 as node +WORKDIR /app +COPY . . +RUN npm install +RUN npm run build --prod + +# Stage 2 +FROM nginx:alpine +COPY --from=node /app/dist/geosmartmap /usr/share/nginx/html diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 4ca2194..f51a2a4 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,4 +1,4 @@ export const environment = { - api: 'http://localhost:8080', - production: true + api: 'https://api.geosmart.supanadit.com', + production: true }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 15c0c7a..5aeaf51 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -3,8 +3,8 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - api: 'http://localhost:8080', - production: false + api: 'https://api.geosmart.supanadit.com', + production: false }; /*