diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..420288eea9 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,9 @@ +.git +.gitignore +node_modules +npm-debug.log +Dockerfile* +docker-compose* +README.md +LICENSE +.vscode \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 4a90bead47..18e5a12c4f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,4 @@ { "typescript.tsdk": "./node_modules/typescript/lib", - "tslint.enable": false + "tslint.enable": false, } diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..0af0caeae3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +# 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 + + diff --git a/README.md b/README.md index 981c331533..c922d8f77e 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,10 @@ To install ngx-admin you have to use NodeJS version 14.14+ because of [node-sass](https://github.com/sass/node-sass) version utilized in the application. +# Docker + +You can now build your own image and run it on Docker + # Material theme for ngx-admin Material admin theme is based on the most popular Angular dashboard template - [ngx-admin](https://akveo.github.io/ngx-admin?utm_campaign=ngx_admin%20-%20home%20-%20ngx_admin%20github%20readme&utm_source=ngx_admin_material&utm_medium=referral&utm_content=github_readme)