Skip to content

Commit 01d4abe

Browse files
committed
added Dockerfile + documentation
1 parent e7ded10 commit 01d4abe

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.git
2+
node_modules

Dockerfile

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM node:12.16.1-alpine As builder
2+
3+
WORKDIR /usr/src/app
4+
5+
COPY package.json package-lock.json ./
6+
7+
RUN npm install
8+
9+
COPY . .
10+
11+
RUN npm run build --prod
12+
13+
FROM nginx:1.15.8-alpine
14+
15+
COPY --from=builder /usr/src/app/dist/angular-starter/ /usr/share/nginx/html

README.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![default](https://user-images.githubusercontent.com/7531596/81993396-d5142b00-9645-11ea-995f-98342b7d5c8f.png)](https://github.com/wlucha/angular-starter)
2-
# Angular 9 + Material + Transloco + Jest + Compodoc
2+
# Angular 9 + Material + Transloco + Jest + Compodoc + Docker
33
Angular 9 Starter project with Material, Transloco, Jest & Compodoc
44
by [@wlucha](https://github.com/wlucha)
55

@@ -18,6 +18,7 @@ by [@wlucha](https://github.com/wlucha)
1818
✅ Internationalization with Transloco
1919
✅ Auto documentation with Compodoc
2020
✅ Analyse your project with webpack-bundle-analyzer
21+
✅ Docker Support
2122

2223
## Deploy
2324
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)
@@ -40,6 +41,15 @@ npm run start
4041
# Open in browser: http://localhost:4200
4142
```
4243

44+
## Docker Deployment
45+
```bash
46+
# Build Docker image
47+
docker build . -t angular-starter
48+
49+
# Run Docker Container
50+
docker run -p 3000:80 angular-starter
51+
```
52+
4353
## Commands
4454
- `npm run start` - start the app
4555
- `npm run test` - run unit tests

0 commit comments

Comments
 (0)