add: (devops) build output from dev to docker

This commit is contained in:
Mohamed Sohail 2021-11-02 16:07:55 +03:00
parent 3b4701e98c
commit 1f97590857
Signed by: kamikazechaser
GPG Key ID: 7DD45520C01CD85D
4 changed files with 20 additions and 8 deletions

View File

@ -1,3 +1,2 @@
.idea/ .idea/
dist/
node_modules/ node_modules/

5
Dockerfile.local-build Normal file
View File

@ -0,0 +1,5 @@
FROM nginx:mainline-alpine
COPY ./dist/cic-staff-client /usr/share/nginx/html
EXPOSE 80

View File

@ -4,10 +4,18 @@ An angular admin web client for managing users and transactions in the CIC netwo
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.2.0. This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.2.0.
## Node 17 Specific Dev Env ## Node 17 Specific Dev/Build Environment
In package.json:dependencies -> "cic-client-meta": "file:./tmp/cic-client-meta-0.0.7-alpha.6.tgz", * In `package.json:dependencies` -> `"cic-client-meta": "file:./tmp/cic-client-meta-0.0.7-alpha.6.tgz",`
in package.json:scripts -> "start:dev": "export NODE_OPTIONS=--openssl-legacy-provider; ng serve -c dev", * in `package.json:scripts` -> `"start:dev": "export NODE_OPTIONS=--openssl-legacy-provider; ng serve -c dev",`
Building Docker images:
```bash
# bump package if making a change
$ yarn build:prod
$ docker build -t cic-staff-client:latest -f Dockerfile.local-build .
```
## Angular CLI ## Angular CLI

View File

@ -1,13 +1,13 @@
{ {
"name": "cic-staff-client", "name": "cic-staff-client",
"version": "0.0.0", "version": "0.2.0",
"scripts": { "scripts": {
"config:dev": "ts-node set-env.ts --environment=dev", "config:dev": "ts-node set-env.ts --environment=dev",
"config:prod": "ts-node set-env.ts --environment=prod", "config:prod": "ts-node set-env.ts --environment=prod",
"start:dev": "export NODE_OPTIONS=--openssl-legacy-provider; ng serve -c dev", "start:dev": "export NODE_OPTIONS=--openssl-legacy-provider; ng serve -c dev",
"start:prod": "ng serve --prod", "start:prod": "export NODE_OPTIONS=--openssl-legacy-provider; ng serve --prod",
"build:dev": "ng build -c dev", "build:dev": "export NODE_OPTIONS=--openssl-legacy-provider; ng build -c dev",
"build:prod": "ng build --prod", "build:prod": "export NODE_OPTIONS=--openssl-legacy-provider; ng build --prod",
"start:pwa": "npm run build:prod && http-server -p 4200 dist/cic-staff-client", "start:pwa": "npm run build:prod && http-server -p 4200 dist/cic-staff-client",
"test": "ng test", "test": "ng test",
"format:check": "prettier --config ./.prettierrc --list-different src/**/*.{ts,js,json,css,scss,html}", "format:check": "prettier --config ./.prettierrc --list-different src/**/*.{ts,js,json,css,scss,html}",