diff --git a/README.md b/README.md index 0b68330..bfd2ef1 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,14 @@ Production deployments should deploy the application by building and serving the To build the node explorer, ``` -ng build --configuration=prod +ng build --configuration=production +``` + +This can also be done by using the Dockerfile for a more reliable build environment with + +``` +docker-compose -f docker-compose.prod.yaml up + ``` ### Staging @@ -51,6 +58,12 @@ Staging builds are done similarly to production with ng build --configuration=stage ``` +This can also be done by using the Dockerfile for a more reliable build environment with + +``` +docker-compose -f docker-compose.stage.yaml up +``` + ## Developing The standard Git Flow: create a feature branch off of the `develop` branch and make pull requests into it. For full releases, merge from the `develop` branch into `main`. diff --git a/node-browser/Dockerfile b/node-browser/Dockerfile new file mode 100644 index 0000000..854128a --- /dev/null +++ b/node-browser/Dockerfile @@ -0,0 +1,10 @@ +FROM node:16.0.0-bullseye-slim + +RUN mkdir /app +WORKDIR /app + +COPY package.json package-lock.json ./ +RUN npm i +RUN npm install -g @angular/cli + +COPY . . \ No newline at end of file diff --git a/node-browser/docker-compose.stage.yaml b/node-browser/docker-compose.stage.yaml new file mode 100644 index 0000000..68cf725 --- /dev/null +++ b/node-browser/docker-compose.stage.yaml @@ -0,0 +1,6 @@ +services: + node-explorer: + build: '.' + volumes: + - ./dist/:/app/dist/ + entrypoint: ["ng","build","--configuration=stage"] diff --git a/node-browser/docker-compose.yaml b/node-browser/docker-compose.yaml new file mode 100644 index 0000000..d559a67 --- /dev/null +++ b/node-browser/docker-compose.yaml @@ -0,0 +1,6 @@ +services: + node-explorer: + build: '.' + volumes: + - ./dist/:/app/dist/ + entrypoint: ["ng","build","--configuration=production"]