From 6e57ef281da36c3a3dc5049e57f58e32003ada0e Mon Sep 17 00:00:00 2001 From: syuilo <syuilotan@yahoo.co.jp> Date: Fri, 19 May 2017 00:52:50 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=84=E3=81=A3=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- docs/BASE.pug | 43 ---------- docs/docker.en.md | 23 ++++++ docs/license.pug | 8 -- docs/{setup.md => setup.en.md} | 63 +++++---------- docs/setup.ja.md | 93 ++++++++++++++++++++++ {docs => src/docs}/api/entities/post.pug | 0 {docs => src/docs}/api/entities/user.pug | 0 {docs => src/docs}/api/getting-started.pug | 0 {docs => src/docs}/api/library.pug | 0 {docs => src/docs}/index.pug | 0 {docs => src/docs}/link-to-twitter.pug | 0 {docs => src/docs}/privacy.pug | 0 {docs => src/docs}/tou.pug | 0 14 files changed, 135 insertions(+), 97 deletions(-) delete mode 100644 docs/BASE.pug create mode 100644 docs/docker.en.md delete mode 100644 docs/license.pug rename docs/{setup.md => setup.en.md} (71%) create mode 100644 docs/setup.ja.md rename {docs => src/docs}/api/entities/post.pug (100%) rename {docs => src/docs}/api/entities/user.pug (100%) rename {docs => src/docs}/api/getting-started.pug (100%) rename {docs => src/docs}/api/library.pug (100%) rename {docs => src/docs}/index.pug (100%) rename {docs => src/docs}/link-to-twitter.pug (100%) rename {docs => src/docs}/privacy.pug (100%) rename {docs => src/docs}/tou.pug (100%) diff --git a/README.md b/README.md index 7aadc41ea8..2b7bf0aa11 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ and more! You can touch with your own eyes at https://misskey.xyz/. Setup and Installation ---------------------------------------------------------------- -Please see [Setup and installation guide](./docs/setup.md). +Please see [Setup and installation guide](./docs/setup.en.md). Contribution ---------------------------------------------------------------- diff --git a/docs/BASE.pug b/docs/BASE.pug deleted file mode 100644 index 633488202f..0000000000 --- a/docs/BASE.pug +++ /dev/null @@ -1,43 +0,0 @@ -doctype html - -html(lang='ja', dir='ltr') - - head - meta(charset='utf-8') - meta(name='application-name', content='Misskey') - meta(name='theme-color', content=themeColor) - meta(name='referrer', content='origin') - meta(name='viewport', content='width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no') - link(rel='stylesheet', href='/assets/style.css') - title - block title - | | About Misskey - - body - nav - ul - li: a(href='/link-to-twitter') Twitterã¨é€£æºã™ã‚‹ - li - p API - ul - li: a(href='/api/getting-started') Getting Started - li - p Entities - ul - li: a(href='/api/entities/post') Post - li: a(href='/api/entities/user') User - li: a(href='/api/library') ライブラリ - li: a(href='/tou') 利用è¦ç´„ - li: a(href='/privacy') プライãƒã‚·ãƒ¼ - li: a(href='/license') ライセンス - - main - article - block content - footer - p.contribution - | é–“é•ã„を見ã¤ã‘ãŸã€ã¾ãŸã¯ãƒ‰ã‚ュメントã«è²¢çŒ®ã—ãŸã„ã§ã™ã‹ï¼Ÿ - a(href='https://github.com/syuilo/misskey/blob/master/docs/' + path + '.pug', target='_blank') Github 上ã§ã“ã®ãƒšãƒ¼ã‚¸ã‚’編集ã™ã‚‹ - | ã‹ã€ - a(href='https://github.com/syuilo/misskey/fork', target='_blank') Github ã‹ã‚‰ã“ã®ã‚µã‚¤ãƒˆã‚’ Fork ã—ã¦ãƒ—ルリクエストã—ã¾ã—ょã†ï¼ - p.copyright (c) syuilo 2017 diff --git a/docs/docker.en.md b/docs/docker.en.md new file mode 100644 index 0000000000..fc5f348bfb --- /dev/null +++ b/docs/docker.en.md @@ -0,0 +1,23 @@ +Setup with Docker :whale: +================================================================ + +Ensure that the working directory is the repository root directory. + +To create misskey image: + +`sudo docker build -t misskey ./docker` + +To run misskey: + +`sudo docker run --rm -i -t -p $PORT:80 -v $(pwd):/root/misskey -v $DBPATH:/data/db misskey` + +where `$PORT` is the port used to access Misskey Web from host browser +and `$DBPATH` is the path of MongoDB database on the host for data persistence. + +ex: `sudo docker run --rm -i -t -p 80:80 -v $(pwd):/root/misskey -v /data/db:/data/db misskey` + +If you want to run misskey in production mode, add `--env NODE_ENV=production` like this: + +`sudo docker run --rm -i -t -p 80:80 -v $(pwd):/root/misskey -v /data/db:/data/db --env NODE_ENV=production misskey` + +Note that `$(pwd)` is the working directory. diff --git a/docs/license.pug b/docs/license.pug deleted file mode 100644 index 323b9b9528..0000000000 --- a/docs/license.pug +++ /dev/null @@ -1,8 +0,0 @@ -extend ./BASE - -block title - | ライセンス - -block content - h1 ライセンス - div!= license diff --git a/docs/setup.md b/docs/setup.en.md similarity index 71% rename from docs/setup.md rename to docs/setup.en.md index 3a5edfca97..4f8b3b2019 100644 --- a/docs/setup.md +++ b/docs/setup.en.md @@ -4,51 +4,14 @@ Misskey Setup and Installation Guide We thank you for your interest in setup your Misskey server! This guide describes how to install and setup Misskey. -*1.* Install dependencies ----------------------------------------------------------------- - -There is **two ways** to install and setup dependencies: - -### WAY 1) Setup with Docker :whale: - -Ensure that the working directory is the repository root directory. - -To create misskey image: - -`sudo docker build -t misskey ./docker` - -To run misskey: - -`sudo docker run --rm -i -t -p $PORT:80 -v $(pwd):/root/misskey -v $DBPATH:/data/db misskey` - -where `$PORT` is the port used to access Misskey Web from host browser -and `$DBPATH` is the path of MongoDB database on the host for data persistence. - -ex: `sudo docker run --rm -i -t -p 80:80 -v $(pwd):/root/misskey -v /data/db:/data/db misskey` +[Japanse version also available - 日本語版もã‚ã‚Šã¾ã™](./setup.ja.md) -If you want to run misskey in production mode, add `--env NODE_ENV=production` like this: - -`sudo docker run --rm -i -t -p 80:80 -v $(pwd):/root/misskey -v /data/db:/data/db --env NODE_ENV=production misskey` - -Note that `$(pwd)` is the working directory. - -### WAY 2) Setup manually - -Please install and setup following dependencies: - -#### Dependencies :package: -Please install these softwares. -* *Node.js* and *npm* -* **[MongoDB](https://www.mongodb.com/)** -* **[Redis](https://redis.io/)** -* **[GraphicsMagick](http://www.graphicsmagick.org/)** +---------------------------------------------------------------- -##### Optional -* [Elasticsearch](https://www.elastic.co/) - used to provide searching feature instead of MongoDB +If you can use Docker, Please see [Setup with Docker](./docker.en.md). -*2.* Domains +*1.* Domains ---------------------------------------------------------------- - Misskey requires two domains called the primary domain and the secondary domain. * The primary domain is used to provide main service of Misskey. @@ -65,15 +28,26 @@ Note that Misskey uses following subdomains: * **dev**.*{primary domain}* * **file**.*{secondary domain}* -*3.* reCAPTCHA tokens +*2.* reCAPTCHA tokens ---------------------------------------------------------------- - Misskey requires reCAPTCHA tokens. Please visit https://www.google.com/recaptcha/intro/ and generate keys. -*4.* Install Misskey +*3.* Install dependencies ---------------------------------------------------------------- +Please install and setup these softwares: +#### Dependencies :package: +* *Node.js* and *npm* +* **[MongoDB](https://www.mongodb.com/)** +* **[Redis](https://redis.io/)** +* **[GraphicsMagick](http://www.graphicsmagick.org/)** + +##### Optional +* [Elasticsearch](https://www.elastic.co/) - used to provide searching feature instead of MongoDB + +*4.* Install Misskey +---------------------------------------------------------------- There is **two ways** to install Misskey: ### WAY 1) Using built code (recommended) @@ -105,7 +79,6 @@ If you want to build Misskey manually, you can do it via the *5.* That is it. ---------------------------------------------------------------- - ãŠç–²ã‚Œæ§˜ã§ã—ãŸã€‚ã“ã‚Œã§Misskeyã‚’å‹•ã‹ã™æº–å‚™ã¯æ•´ã„ã¾ã—ãŸã€‚ ### Launch diff --git a/docs/setup.ja.md b/docs/setup.ja.md new file mode 100644 index 0000000000..e260ae0fcb --- /dev/null +++ b/docs/setup.ja.md @@ -0,0 +1,93 @@ +Misskey構築ã®æ‰‹å¼•ã +================================================================ + +Misskeyサーãƒãƒ¼ã®æ§‹ç¯‰ã«ã”関心をãŠå¯„ã›ã„ãŸã ãã‚ã‚ŠãŒã¨ã†ã”ã–ã„ã¾ã™ï¼ +ã“ã®ã‚¬ã‚¤ãƒ‰ã§ã¯Misskeyã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ãƒ»ã‚»ãƒƒãƒˆã‚¢ãƒƒãƒ—方法ã«ã¤ã„ã¦è§£èª¬ã—ã¾ã™ã€‚ + +[英語版もã‚ã‚Šã¾ã™ - English version also available](./setup.en.md) + +---------------------------------------------------------------- + +Dockerを利用ã—ã¦Misskeyを構築ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: [Setup with Docker](./docker.en.md)。 +ãã®å ´åˆã€3ãŠã‚ˆã³4番目ã®æ‰‹é †ã¯ã‚¹ã‚ップã§ãã¾ã™ã€‚ + +*1.* ドメインã®ç”¨æ„ +---------------------------------------------------------------- +Misskeyã¯ãƒ—ライマリ ドメインã¨ã‚»ã‚«ãƒ³ãƒ€ãƒª ドメインを必è¦ã¨ã—ã¾ã™ã€‚ + +* プライマリ ドメインã¯Misskeyã®ä¸»è¦ãªéƒ¨åˆ†ã‚’æä¾›ã™ã‚‹ãŸã‚ã«ä½¿ã‚ã‚Œã¾ã™ã€‚ +* セカンダリ ドメインã¯XSSã¨ã„ã£ãŸè„†å¼±æ€§ã®å¯¾ç–ã«ä½¿ã‚ã‚Œã¾ã™ã€‚ + +**セカンダリ ドメインãŒãƒ—ライマリ ドメインã®ã‚µãƒ–ドメインã§ã‚ã£ã¦ã¯ãªã‚Šã¾ã›ã‚“。** + +### サブドメイン +Misskeyã¯ä»¥ä¸‹ã®ã‚µãƒ–ドメインを使ã„ã¾ã™: + +* **api**.*{primary domain}* +* **auth**.*{primary domain}* +* **about**.*{primary domain}* +* **dev**.*{primary domain}* +* **file**.*{secondary domain}* + +*2.* reCAPTCHAトークンã®ç”¨æ„ +---------------------------------------------------------------- +Misskeyã¯reCAPTCHAトークンを必è¦ã¨ã—ã¾ã™ã€‚ +https://www.google.com/recaptcha/intro/ ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¦ãƒˆãƒ¼ã‚¯ãƒ³ã‚’生æˆã—ã¦ãã ã•ã„。 + +*3.* ä¾å˜é–¢ä¿‚をインストールã™ã‚‹ +---------------------------------------------------------------- +ã“れらã®ã‚½ãƒ•ãƒˆã‚¦ã‚§ã‚¢ã‚’インストール・è¨å®šã—ã¦ãã ã•ã„: + +#### ä¾å˜é–¢ä¿‚ :package: +* *Node.js* 㨠*npm* +* **[MongoDB](https://www.mongodb.com/)** +* **[Redis](https://redis.io/)** +* **[GraphicsMagick](http://www.graphicsmagick.org/)** + +##### オプション +* [Elasticsearch](https://www.elastic.co/) - 検索機能をå‘上ã•ã›ã‚‹ãŸã‚ã«ç”¨ã„ã¾ã™ã€‚ + +*4.* Misskeyã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« +---------------------------------------------------------------- +Misskeyをインストールã™ã‚‹ã«ã¯**2ã¤ã®æ–¹æ³•**ãŒã‚ã‚Šã¾ã™: + +### 方法 1) ビルドã•ã‚ŒãŸã‚³ãƒ¼ãƒ‰ã‚’利用ã™ã‚‹ (推奨) +Misskeyã«ã¯å…¬å¼ã®ãƒªãƒªãƒ¼ã‚¹ãŒã‚ã‚Šã¾ã™ã€‚ +ビルドã•ã‚ŒãŸã‚³ãƒ¼ãƒ‰ã¯CIテストã«åˆæ ¼ã—ãŸå¾Œã€è‡ªå‹•ã§ https://github.com/syuilo/misskey/tree/release ã«pushã•ã‚Œã¦ã„ã¾ã™ã€‚ + +1. `git clone -b release git://github.com/syuilo/misskey.git` +2. `cd misskey` +3. `npm install` + +#### アップデートã™ã‚‹ã«ã¯: +1. `git fetch` +2. `git reset --hard origin/release` +3. `npm install` + +### 方法 2) ソースコードを利用ã™ã‚‹ +Misskeyを手動ã§ãƒ“ルドã—ãŸã„å ´åˆã¯ã€Misskeyã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã¨ä¾å˜é–¢ä¿‚をインストールã—ãŸå¾Œã€ +`build`コマンドを用ã„ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +1. `git clone -b master git://github.com/syuilo/misskey.git` +2. `cd misskey` +3. `npm install` +4. `npm run build` + +#### アップデートã™ã‚‹ã«ã¯: +1. `git pull origin master` +2. `npm install` +3. `npm run build` + +*5.* 以上ã§ã™ï¼ +---------------------------------------------------------------- +ãŠç–²ã‚Œæ§˜ã§ã—ãŸã€‚ã“ã‚Œã§Misskeyã‚’å‹•ã‹ã™æº–å‚™ã¯æ•´ã„ã¾ã—ãŸã€‚ + +### èµ·å‹• +`sudo npm start`ã™ã‚‹ã ã‘ã§ã™ã€‚GLHF! + +### テスト +(ビルドã•ã‚Œã¦ã„る状態ã§)`npm test` + +### デãƒãƒƒã‚° :bug: +#### デãƒãƒƒã‚°ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表示ã™ã‚‹ã‚ˆã†ã«ã™ã‚‹ +Misskeyã¯[debug](https://github.com/visionmedia/debug)モジュールを利用ã—ã¦ãŠã‚Šã€ãƒãƒ¼ãƒ スペースã¯`misskey:*`ã¨ãªã£ã¦ã„ã¾ã™ã€‚ diff --git a/docs/api/entities/post.pug b/src/docs/api/entities/post.pug similarity index 100% rename from docs/api/entities/post.pug rename to src/docs/api/entities/post.pug diff --git a/docs/api/entities/user.pug b/src/docs/api/entities/user.pug similarity index 100% rename from docs/api/entities/user.pug rename to src/docs/api/entities/user.pug diff --git a/docs/api/getting-started.pug b/src/docs/api/getting-started.pug similarity index 100% rename from docs/api/getting-started.pug rename to src/docs/api/getting-started.pug diff --git a/docs/api/library.pug b/src/docs/api/library.pug similarity index 100% rename from docs/api/library.pug rename to src/docs/api/library.pug diff --git a/docs/index.pug b/src/docs/index.pug similarity index 100% rename from docs/index.pug rename to src/docs/index.pug diff --git a/docs/link-to-twitter.pug b/src/docs/link-to-twitter.pug similarity index 100% rename from docs/link-to-twitter.pug rename to src/docs/link-to-twitter.pug diff --git a/docs/privacy.pug b/src/docs/privacy.pug similarity index 100% rename from docs/privacy.pug rename to src/docs/privacy.pug diff --git a/docs/tou.pug b/src/docs/tou.pug similarity index 100% rename from docs/tou.pug rename to src/docs/tou.pug -- GitLab