add dockerfile

This commit is contained in:
Chan
2025-01-10 15:17:36 +09:00
parent ab9e7bf220
commit 4e2ba1bf9e
4 changed files with 40 additions and 1 deletions

1
.dockerignore Normal file
View File

@@ -0,0 +1 @@
node_modules

View File

@@ -33,4 +33,12 @@ yarn install
yarn start
```
이 명령어는 demo 디렉토리에 있는 페이지를 엽니다. 필요하다면 audio.mp3와 audio.json 파일을 교체하여 생성한 스크립트를 테스트하고 확인할 수 있습니다.
이 명령어는 demo 디렉토리에 있는 페이지를 엽니다.
필요하다면 audio.mp3와 audio.json 파일을 교체하여 생성한 스크립트를 테스트하고 확인할 수 있습니다.
## docker
```bash
docker compose build
docker compose up
```

15
docker-compose.yml Normal file
View File

@@ -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

15
dockerfile Normal file
View File

@@ -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" ]