Build & Run (Docker)
Docker で VideoReview を動かす手順です
イメージはリリースごとに ghcr.io で公開しているので、自分で build する必要はありません
Docker Hub にも同じイメージ(aritayuto/videoreview、aritayuto/video-processing)を置いています
※ Docker Compose 2.24 以降が必要です(docker compose version で確認できます)
1. compose.prod.yml で起動
Section titled “1. compose.prod.yml で起動”mkdir video-reviewcd video-reviewcurl -L -O https://raw.githubusercontent.com/arita-yuto/video-review/main/compose.prod.ymldocker compose -f compose.prod.yml up -dhttp://localhost:3489 を開くと、最初の管理者を登録する画面が出ます(管理画面ガイド)
Docker Hub から pull する場合
Section titled “Docker Hub から pull する場合”compose.dockerhub.yml を compose.prod.yml という名前で保存します
以後の更新も Docker Hub から pull されます
curl -L -o compose.prod.yml https://github.com/arita-yuto/video-review/releases/latest/download/compose.dockerhub.yml2. 新しいリリースに更新
Section titled “2. 新しいリリースに更新”docker compose -f compose.prod.yml pulldocker compose -f compose.prod.yml up -d3. .env の設定
Section titled “3. .env の設定”保存先やバージョンを変えたいときは、compose.prod.yml と同じフォルダに .env を置きます
| 変数 | 内容 |
|---|---|
DOCKER_HOST_STORAGE |
アップロードしたファイルを置くホスト側のパス(空なら Docker の named volume に保存) |
VIDEO_REVIEW_VERSION |
使うリリース、例 v0.2.0(空なら最新) |
video-review-cli で更新
Section titled “video-review-cli で更新”compose.prod.yml と同じフォルダに video-review-cli を置くと、更新がコマンド 1 つで済みます
# Linuxcurl -L -o video-review-cli https://github.com/arita-yuto/video-review/releases/latest/download/video-review-cli-linux-amd64chmod +x video-review-cli
# Windowscurl.exe -L -o video-review-cli.exe https://github.com/arita-yuto/video-review/releases/latest/download/video-review-cli-windows-amd64.exe
# 更新./video-review-cli upgrade --docker起動と停止は ./video-review-cli start --docker、./video-review-cli stop --docker です
ソースから build
Section titled “ソースから build”公開イメージの代わりに手元で build するときは、compose が参照する名前で tag を付けます
docker build -t ghcr.io/arita-yuto/video-review/videoreview:latest -f docker/web/Dockerfile.prod .docker build -t ghcr.io/arita-yuto/video-review/video-processing:latest -f docker/video-processing/Dockerfile .開発用(Docker)
Section titled “開発用(Docker)”npm installdocker compose up -d --build