Skip to content

Commit d624195

Browse files
committed
Feat: Docker file composed
1 parent 6b34cc9 commit d624195

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM node:alpine
2+
WORKDIR /app
3+
4+
5+
COPY package.json .
6+
RUN npm update
7+
RUN npm install
8+
9+
10+
COPY . .
11+
12+
CMD [ "npm", "start" ]

Dockerfile.dev

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM node:alpine
2+
WORKDIR /app
3+
4+
5+
COPY package.json .
6+
RUN npm update
7+
RUN npm install
8+
9+
10+
COPY . .
11+
12+
CMD [ "npm", "start" ]

docker-compose.prod.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: '3'
2+
services:
3+
client:
4+
build:
5+
context: ./src
6+
dockerfile: Dockerfile
7+
ports:
8+
- '80:80'

docker-compose.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: '3'
2+
services:
3+
client:
4+
build:
5+
context: ./src
6+
dockerfile: Dockerfile.dev
7+
volumes:
8+
- ./src
9+
ports:
10+
- '3000:8000'

0 commit comments

Comments
 (0)