diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..6e81ffb --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,16 @@ +version: '3' + +services: + nodejs: + build: + context: ./docker/node + + volumes: + - .:/app + + # 常時起動用のオプション + tty: true + stdin_open: true + + ports: + - 3000:3000 \ No newline at end of file diff --git a/docker/node/Dockerfile b/docker/node/Dockerfile new file mode 100644 index 0000000..cf3f46e --- /dev/null +++ b/docker/node/Dockerfile @@ -0,0 +1,3 @@ +FROM node:20-alpine + +WORKDIR /app diff --git a/環境構築手順.txt b/環境構築手順.txt new file mode 100644 index 0000000..87c3264 --- /dev/null +++ b/環境構築手順.txt @@ -0,0 +1,10 @@ +前提条件 +・dockerインストール済みであること + +1. コンテナの起動 # docker compose up -d +2. コンテナへログイン # docker compose exec nodejs sh +3. 初回でパッケージのインストールが済んでいない場合 # yarn install + +開発用のサーバーを立ち上げる場合 # yarn start +ビルドする場合 # yarn build + => buildディレクトリにファイルが作成される \ No newline at end of file