diff --git a/Dockerfile b/Dockerfile index c4429580..c036d8af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Based on https://mherman.org/blog/dockerizing-an-angular-app/ # base image -FROM node:20-alpine AS DEV +FROM node:20-alpine AS dev # removed this for now # install chrome for protractor tests @@ -22,10 +22,9 @@ RUN npm install -g @angular/cli@20.3.7 # add app COPY . /app -# start app -CMD ng serve --host 0.0.0.0 - - -FROM DEV as PROD -CMD ng serve --host 0.0.0.0 --configuration=production +EXPOSE 8080 +EXPOSE 8081 +# start app +# https://stackoverflow.com/questions/43492354/how-to-allow-access-outside-localhost +CMD ["ng", "serve", "--host", "0.0.0.0", "--port", "8081", "--disable-host-check"] diff --git a/src/assets/env.js b/src/assets/env.js index 3ff7b213..341cd4bb 100644 --- a/src/assets/env.js +++ b/src/assets/env.js @@ -2,7 +2,7 @@ (function (window) { window["env"] = window["env"] || {}; window["env"].PRODUCTION = false; - window["env"].BASE_URL = "http://localhost:3000/api/v1/"; // For local testing + window["env"].BASE_URL = "/api/v1/"; // For local testing window["env"].TABLE_PAGE_SIZE = 25; // For local testing window["env"].DAF_USERNAME = ""; window["env"].DAF_PASSWORD = "";