Skip to content

Commit 4cd29af

Browse files
committed
도커라이징
1 parent 41179c4 commit 4cd29af

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

Dockerfile

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
FROM node:alpine
1+
FROM node:10.18.1
22

33
# Create work directory
44
WORKDIR /usr/src/app
55

6-
# Install runtime dependencies
7-
RUN npm install yarn -g
8-
96
# Copy app source to work directory
107
COPY . /usr/src/app
118

129
# Install app dependencies
1310
RUN yarn install
1411

15-
# Build and run the app
16-
CMD npm start serve
12+
# Build app
13+
RUN npm start build
14+
15+
# Run app
16+
ENTRYPOINT ["npm", "start"]
17+

docker-compose.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: '3.7'
2+
services:
3+
app:
4+
build:
5+
dockerfile: ./Dockerfile
6+
context: .
7+
restart: always
8+
container_name: app
9+
volumes:
10+
- ./.env:/app/.env
11+
ports:
12+
- "3000:3000"
13+

0 commit comments

Comments
 (0)