やった

This commit is contained in:
syuilo 2017-05-19 00:52:50 +09:00
parent 27a519cb1c
commit 6e57ef281d
14 changed files with 135 additions and 97 deletions

View file

@ -25,7 +25,7 @@ and more! You can touch with your own eyes at https://misskey.xyz/.
Setup and Installation Setup and Installation
---------------------------------------------------------------- ----------------------------------------------------------------
Please see [Setup and installation guide](./docs/setup.md). Please see [Setup and installation guide](./docs/setup.en.md).
Contribution Contribution
---------------------------------------------------------------- ----------------------------------------------------------------

View file

@ -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

23
docs/docker.en.md Normal file
View file

@ -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.

View file

@ -1,8 +0,0 @@
extend ./BASE
block title
| ライセンス
block content
h1 ライセンス
div!= license

View file

@ -4,51 +4,14 @@ Misskey Setup and Installation Guide
We thank you for your interest in setup your Misskey server! We thank you for your interest in setup your Misskey server!
This guide describes how to install and setup Misskey. This guide describes how to install and setup Misskey.
*1.* Install dependencies [Japanse version also available - 日本語版もあります](./setup.ja.md)
---------------------------------------------------------------- ----------------------------------------------------------------
There is **two ways** to install and setup dependencies: If you can use Docker, Please see [Setup with Docker](./docker.en.md).
### WAY 1) Setup with Docker :whale: *1.* Domains
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.
### 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
*2.* Domains
---------------------------------------------------------------- ----------------------------------------------------------------
Misskey requires two domains called the primary domain and the secondary domain. Misskey requires two domains called the primary domain and the secondary domain.
* The primary domain is used to provide main service of Misskey. * The primary domain is used to provide main service of Misskey.
@ -65,15 +28,26 @@ Note that Misskey uses following subdomains:
* **dev**.*{primary domain}* * **dev**.*{primary domain}*
* **file**.*{secondary domain}* * **file**.*{secondary domain}*
*3.* reCAPTCHA tokens *2.* reCAPTCHA tokens
---------------------------------------------------------------- ----------------------------------------------------------------
Misskey requires reCAPTCHA tokens. Misskey requires reCAPTCHA tokens.
Please visit https://www.google.com/recaptcha/intro/ and generate keys. Please visit https://www.google.com/recaptcha/intro/ and generate keys.
*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 *4.* Install Misskey
---------------------------------------------------------------- ----------------------------------------------------------------
There is **two ways** to install Misskey: There is **two ways** to install Misskey:
### WAY 1) Using built code (recommended) ### 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. *5.* That is it.
---------------------------------------------------------------- ----------------------------------------------------------------
お疲れ様でした。これでMisskeyを動かす準備は整いました。 お疲れ様でした。これでMisskeyを動かす準備は整いました。
### Launch ### Launch

93
docs/setup.ja.md Normal file
View file

@ -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:*`となっています。