diff --git a/.github/workflows/docker-image-dev.yml b/.github/workflows/docker-image-dev.yml new file mode 100644 index 0000000..04d360a --- /dev/null +++ b/.github/workflows/docker-image-dev.yml @@ -0,0 +1,49 @@ +name: Publish Docker dev image + +on: + workflow_dispatch: + +jobs: + docker: + name: Push Docker dev image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + repository: ${{ secrets.GH_REPO }} + token: ${{ secrets.GH_PAT }} + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18.x' + cache: 'yarn' + cache-dependency-path: web/yarn.lock + + - name: Build frontend + run: | + yarn install --frozen-lockfile --non-interactive + yarn quasar build + cp -a dist/spa/. $GITHUB_WORKSPACE/public/dist/ + working-directory: ./web + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + platforms: linux/amd64 + push: true + tags: vscodev/kikoeru:dev diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..cf59da9 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,49 @@ +name: Publish Docker image + +on: + workflow_dispatch: + +jobs: + docker: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + repository: ${{ secrets.GH_REPO }} + token: ${{ secrets.GH_PAT }} + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18.x' + cache: 'yarn' + cache-dependency-path: web/yarn.lock + + - name: Build frontend + run: | + yarn install --frozen-lockfile --non-interactive + yarn quasar build + cp -a dist/spa/. $GITHUB_WORKSPACE/public/dist/ + working-directory: ./web + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/arm/v6,linux/s390x + push: true + tags: vscodev/kikoeru:latest diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e029ed3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,31 @@ +# Created by .ignore support plugin (hsz.mobi) +### Go template +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ +public/dist/* +!public/dist/README.md + +# JetBrains +.idea/ + +# MacOS +.DS_Store +.AppleDouble +.LSOverride + +# Kikoeru +kikoeru +kikoeru.log diff --git a/README.md b/README.md new file mode 100644 index 0000000..66f92ca --- /dev/null +++ b/README.md @@ -0,0 +1,85 @@ +# Kikoeru + +*一个自托管的 DLsite 音声作品整理和媒体播放软件, 使用 Go 和 Vue.js。* + +![screenshot](screenshot.png) + +## 功能 + +- 自动从DLsite爬取作品元数据,支持所有作品类型(RJ/BJ/VJ),包括已下架的作品。 +- 支持多种存储,你可以从本机存储、阿里云盘、百度网盘以及OneDrive中导入作品资源。 +- 强大的个性化搜索功能,支持多关键字、多标签检索,支持对搜索结果二级筛选过滤。 +- 支持多种格式的字幕显示,`.lrc` 、`.srt` 、`.vtt` 以及 `.ass` ,支持字幕偏移。 + +## 安装 + +创建一个工作目录,例如 `kikoeru` 。 + +```sh +mkdir kikoeru +cd kikoeru +``` + +拉取Kikoeru镜像,创建容器并运行。 + +```sh +docker run -d --name kikoeru -p 2333:2333 -v $PWD/data:/opt/kikoeru/data -e TZ=Asia/Shanghai -e PUID=$(id -u) -e PGID=$(id -g) -e UMASK=022 --restart unless-stopped vscodev/kikoeru:latest +``` + +首次运行Kikoeru会自动创建管理员帐号,你可通过 `docker logs` 命令查看。 + +```sh +docker logs kikoeru +``` + +忘记密码可通过 `kikoeru admin` 命令重置。 + +```sh +docker exec -it kikoeru ./kikoeru admin +``` + +## 导入作品 + +Kikoeru支持从多种存储导入作品资源,配置填写可参考 [Alist](https://alist.nn.ci/zh/guide/) 。 + +每个作品对应一个目录,且文件夹名称必须包含一个有效的作品ID,示例: + +``` +RJ334212 +[みやぢ屋][RJ334212]ガチ恋不可避の耳リフレ2~ぼくっこ店員ゆずるの出張サービス~ +``` + +**不要包含重复的作品,否则会被覆盖,而且顺序是不确定的。** + +## 反向代理 + +你需要在NGINX网站配置文件的 `server` 字段中添加 + +``` +location / { + proxy_pass http://127.0.0.1:2333; + proxy_http_version 1.1; + proxy_cache_bypass $http_upgrade; + + # Proxy SSL + proxy_ssl_server_name on; + + # Proxy headers + proxy_set_header Host $host; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Forwarded $proxy_add_forwarded; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Port $server_port; + proxy_set_header Range $http_range; + proxy_set_header If-Range $http_if_range; + + # Proxy timeouts + proxy_connect_timeout 60s; + proxy_send_timeout 60s; + proxy_read_timeout 60s; +} +``` diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..9dd478b Binary files /dev/null and b/screenshot.png differ