데모 실행환경 도커화

This commit is contained in:
2026-04-13 18:12:12 +09:00
parent ee2e186bd6
commit 94ee80fe80
3 changed files with 37 additions and 0 deletions

5
.dockerignore Normal file
View File

@@ -0,0 +1,5 @@
node_modules
npm-debug.log
.git
.env
keys.json

21
Dockerfile Normal file
View 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
View 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