From f313e5c51ffdc20145b4ecb91a1c962f3eab8c28 Mon Sep 17 00:00:00 2001 From: yuuki <> Date: Thu, 4 Apr 2024 09:22:05 +0000 Subject: [PATCH] =?UTF-8?q?nkf=E3=81=AE=E6=9B=B4=E6=96=B0=E3=81=A8?= =?UTF-8?q?=E8=AA=AC=E6=98=8E=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 3 +- README.md | 87 ++++++++++++++++++++++++++++++++++++++++--- requirements.txt | 2 +- scripts/build.sh | 3 -- scripts/codespaces.sh | 18 --------- scripts/deploy.sh | 26 ------------- 6 files changed, 84 insertions(+), 55 deletions(-) delete mode 100644 scripts/build.sh delete mode 100644 scripts/codespaces.sh delete mode 100644 scripts/deploy.sh diff --git a/.dockerignore b/.dockerignore index 0c1dcdd..375e29e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,5 +6,6 @@ /__pycache__ +/README.md + /public/songs -/scripts diff --git a/README.md b/README.md index 4c51fa4..fd49cf0 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,84 @@ -# taiko-web -A web-based Taiko no Tatsujin simulator. +# 太鼓ウェブ -Running instance: [https://taiko.bui.pm](https://taiko.bui.pm) +この太鼓ウェブは改良版です -Still in development. Works best with Chrome. +## デバッグの開始 -## Setup -Please see the [Setup](https://github.com/bui/taiko-web/wiki/Setup) page for setup instructions. +依存関係をインストールします + +```bash +pip install -r requirements.txt +``` + +データベースを起動します + +```bash +docker run --detach \ + --name taiko-mongo-debug \ + --volume taiko-mongo-debug:/data/db \ + --publish 27017:27017 \ + mongo +``` + +```bash +docker run --detach \ + --name taiko-redis-debug \ + --volume taiko-redis-debug:/data \ + --publish 6379:6379 \ + redis +``` + +サーバーを起動してください + +```bash +flask run +``` + +## デプロイ + +Dockerイメージをビルドします + +```bash +docker build -t taiko . +``` + +データベースを起動します + +```bash +docker run --detach \ + --name taiko-mongo \ + --volume taiko-mongo:/data/db \ + mongo +``` + +```bash +docker run --detach \ + --name taiko-redis \ + --volume taiko-redis:/data \ + redis +``` + +今すぐデプロイ! + +- https://taikoapp.uk/ + +```bash +docker run --detach \ + --name taiko \ + --link taiko-mongo \ + --link taiko-redis \ + --env TAIKO_WEB_MONGO_HOST=taiko-mongo \ + --env TAIKO_WEB_REDIS_HOST=taiko-redis \ + --volume songs:/app/public/songs \ + --env LETSENCRYPT_HOST=taikoapp.uk \ + --env VIRTUAL_HOST=taikoapp.uk \ + --env VIRTUAL_PORT=8080 \ + taiko +``` + +終了するには + +```bash +docker stop taiko-mongo taiko-redis taiko +docker rm -f taiko-mongo taiko-redis taiko +``` diff --git a/requirements.txt b/requirements.txt index b2ba05c..3a6dbd2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,5 +12,5 @@ requests==2.31.0 websockets==12.0 Werkzeug==3.0.1 jinja2==3.1.3 -git+https://github.com/nurse/nkf.git#egg=nkf&subdirectory=NKF.python3 +nkf==1.0.3 tjaf==1.0.6 diff --git a/scripts/build.sh b/scripts/build.sh deleted file mode 100644 index 8e28fdd..0000000 --- a/scripts/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -docker build -t taiko . diff --git a/scripts/codespaces.sh b/scripts/codespaces.sh deleted file mode 100644 index 9e0d3c1..0000000 --- a/scripts/codespaces.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -docker run --detach \ - --name taiko-mongo-debug \ - --volume taiko-mongo-debug:/data/db \ - --publish 27017:27017 \ - mongo - -docker run --detach \ - --name taiko-redis-debug \ - --volume taiko-redis-debug:/data \ - --publish 6379:6379 \ - redis - -#pip install -r requirements.txt - -#flask run -python -m flask run diff --git a/scripts/deploy.sh b/scripts/deploy.sh deleted file mode 100644 index 5f216dc..0000000 --- a/scripts/deploy.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -docker kill taiko-mongo taiko-redis taiko -docker rm -f taiko-mongo taiko-redis taiko - -docker run --detach \ - --name taiko-mongo \ - --volume taiko-mongo:/data/db \ - mongo - -docker run --detach \ - --name taiko-redis \ - --volume taiko-redis:/data \ - redis - -docker run --detach \ - --name taiko \ - --link taiko-mongo \ - --link taiko-redis \ - --env TAIKO_WEB_MONGO_HOST=taiko-mongo \ - --env TAIKO_WEB_REDIS_HOST=taiko-redis \ - --volume songs:/app/public/songs \ - --env LETSENCRYPT_HOST=taikoapp.uk \ - --env VIRTUAL_HOST=taikoapp.uk \ - --env VIRTUAL_PORT=8080 \ - taiko