diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/README.md b/README.md index 4f484d0..417a20b 100644 --- a/README.md +++ b/README.md @@ -33,4 +33,12 @@ yarn install yarn start ``` -이 명령어는 demo 디렉토리에 있는 페이지를 엽니다. 필요하다면 audio.mp3와 audio.json 파일을 교체하여 생성한 스크립트를 테스트하고 확인할 수 있습니다. \ No newline at end of file +이 명령어는 demo 디렉토리에 있는 페이지를 엽니다. +필요하다면 audio.mp3와 audio.json 파일을 교체하여 생성한 스크립트를 테스트하고 확인할 수 있습니다. + +## docker + +```bash +docker compose build +docker compose up +``` \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..06323d2 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,15 @@ +version: "3.8" + +services: + whisper-app: + build: + context: . + dockerfile: Dockerfile + environment: + - NODE_ENV=production + ports: + - "8899:8899" + volumes: + - ".:/opt/workspace" + - "/node_modules" + entrypoint: yarn start --port 8899 diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..b4dd458 --- /dev/null +++ b/dockerfile @@ -0,0 +1,15 @@ +FROM node:22.13.0-slim + +ADD . /opt/workspace +WORKDIR /opt/workspace + +COPY package.json . +COPY yarn.lock . + +RUN npx yarn install --frozen-lockfile + +COPY . . +EXPOSE 8899 + + +CMD [ "yarn", "start" ]