setup Containerization

This commit is contained in:
Patrick Bashizi 2023-01-05 14:02:10 +01:00
parent ec68f5e84a
commit c6b9ecc058
4 changed files with 27 additions and 1 deletions

9
.dockerignore Normal file
View file

@ -0,0 +1,9 @@
.git
.gitignore
node_modules
npm-debug.log
Dockerfile*
docker-compose*
README.md
LICENSE
.vscode

View file

@ -1,4 +1,5 @@
{ {
"typescript.tsdk": "./node_modules/typescript/lib", "typescript.tsdk": "./node_modules/typescript/lib",
"tslint.enable": false "tslint.enable": false,
"angular.enable-strict-mode-prompt": false
} }

13
Dockerfile Normal file
View file

@ -0,0 +1,13 @@
# Stage 1
FROM node:14.15.0 as node
WORKDIR /app
COPY . .
RUN npm install
RUN npm run build --prod
# Stage 2
FROM nginx:alpine
COPY --from=node /app/dist /usr/share/nginx/html
# docker run -d -it -p 80:80/tcp --name ngx-admin bashizip/ngx-admin:latest
# docker exec -it 79fb3f7d6f9d /bin/sh

View file

@ -182,5 +182,8 @@
"@schematics/angular:directive": { "@schematics/angular:directive": {
"prefix": "ngx" "prefix": "ngx"
} }
},
"cli": {
"analytics": "6ceaf63a-1fd9-4b47-8f92-86ee6131896a"
} }
} }