데모 실행환경 도커화
This commit is contained in:
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@@ -0,0 +1,5 @@
|
||||
node_modules
|
||||
npm-debug.log
|
||||
.git
|
||||
.env
|
||||
keys.json
|
||||
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM node:20-alpine
|
||||
|
||||
# 앱 디렉터리 생성
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# 앱 의존성 설치
|
||||
# package.json과 package-lock.json을 모두 복사
|
||||
COPY package*.json ./
|
||||
|
||||
# 패키지 설치
|
||||
RUN npm install
|
||||
|
||||
# 앱 소스 추가
|
||||
COPY . .
|
||||
|
||||
# 포트 매핑 (기본 4000포트 사용)
|
||||
ENV PORT=4000
|
||||
EXPOSE 4000
|
||||
|
||||
# 앱 실행
|
||||
CMD [ "npm", "start" ]
|
||||
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
services:
|
||||
headless-login-app:
|
||||
build: .
|
||||
container_name: headless-login-demo
|
||||
ports:
|
||||
- "4000:4000"
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./keys.json:/usr/src/app/keys.json
|
||||
restart: unless-stopped
|
||||
Reference in New Issue
Block a user