Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added docker deployment files #5981

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.git
.gitignore
node_modules
.editorconfig
LICENSE
*.md
Dockerfile*
docker-compose*
.vscode
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM node:14

WORKDIR /app

COPY package.json .

RUN npm install

COPY . .

RUN npm run build --prod

EXPOSE 4200

# Start APP
CMD npm start
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@

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 deployment

For deployment using Docker containers, please use the Dockerfile provided.

Example for local deployment:

First, build the image
```bash
cd /path/to/projectfolder
docker build -t akveo/ngx-admin .
```

And then run the container
```bash
docker run -dt -v /path/to/projectfolder/src:/app/src --name ngx-admin -p 4200:4200 akveo/ngx-admin
```

Finally, wait for a few seconds to let the container init (you can check with `docker logs -f ngx-admin`) and then you can open your browser on http://localhost:4200/.

# 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)
Expand Down
3 changes: 3 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,8 @@
"@schematics/angular:directive": {
"prefix": "ngx"
}
},
"cli": {
"analytics": false
}
}