-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
80 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,9 @@ | ||
## API | ||
ごちイラのバックグラウンドサイド(Flask) | ||
## NuxtImageBoard Backend | ||
NuxtImageBoardのバックエンドサーバ(Flask) | ||
|
||
## Docker用ビルドの流れ | ||
### 1 AMD64用のモジュール集イメージをビルドしてプッシュ(依存モジュール追加時) | ||
``` | ||
docker build -t ghcr.io/gochiira/main-backend-depends:amd64 --file Dockerfile_require . | ||
docker tag a64ebdd234ce ghcr.io/gochiira/main-backend-depends:amd64 | ||
docker push ghcr.io/gochiira/main-backend-depends:amd64 | ||
``` | ||
### 2 ARMv7用のモジュール集イメージをビルドしてプッシュ(依存モジュール追加時) | ||
``` | ||
docker buildx build --platform linux/arm/v7 -t gochiira/main-backend-depends:armv7 --file Dockerfile_require . | ||
docker tag a64ebdd123ce ghcr.io/gochiira/main-backend-depends:armv7 | ||
docker push ghcr.io/gochiira/main-backend-depends:armv7 | ||
``` | ||
### 3 git releaseブランチに対してプッシュ | ||
github actionsが [ghcr.io/gochiira/gochiira-backend:amd64](https://github.com/orgs/gochiira/packages/container/package/gochiira-backend) [ghcr.io/gochiira/gochiira-backend:armv7](https://github.com/orgs/gochiira/packages/container/package/gochiira-backend) などでイメージを公開する | ||
## インストール | ||
[Dockerでインストールする場合はこちら](doc/DEPLOY_DOCKER.md) | ||
[手動でインストールする場合はこちら](doc/DEPLOY_SELF.md) | ||
|
||
## なぜapiフォルダに分かれているか? | ||
[Pythonインタプリタの都合](https://chlere.hatenadiary.org/entry/20110618/1308369842) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## Docker用ビルドの流れ | ||
開発者がリリース時にすることのリスト | ||
|
||
### 1 AMD64用のモジュール集イメージをビルドしてプッシュ(依存モジュール追加時) | ||
``` | ||
docker build -t ghcr.io/gochiira/main-backend-depends:amd64 --file Dockerfile_require . | ||
docker tag a64ebdd234ce ghcr.io/gochiira/main-backend-depends:amd64 | ||
docker push ghcr.io/gochiira/main-backend-depends:amd64 | ||
``` | ||
### 2 ARMv7用のモジュール集イメージをビルドしてプッシュ(依存モジュール追加時) | ||
``` | ||
docker buildx build --platform linux/arm/v7 -t gochiira/main-backend-depends:armv7 --file Dockerfile_require . | ||
docker tag a64ebdd123ce ghcr.io/gochiira/main-backend-depends:armv7 | ||
docker push ghcr.io/gochiira/main-backend-depends:armv7 | ||
``` | ||
### 3 git releaseブランチに対してプッシュ | ||
github actionsが [ghcr.io/gochiira/gochiira-backend:amd64](https://github.com/orgs/gochiira/packages/container/package/gochiira-backend) [ghcr.io/gochiira/gochiira-backend:armv7](https://github.com/orgs/gochiira/packages/container/package/gochiira-backend) などでイメージを公開する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## 一般用ビルドの流れ | ||
開発者がリリース時にすることのリスト | ||
|
||
### 1 git releaseブランチに対してプッシュ | ||
github actionsが 勝手にリリースを作ってくれる(理想) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
## Dockerを使った稼働の流れ | ||
利用者がインストール時にすることのリスト | ||
|
||
### 1 dockerおよびdocker-composeの導入 | ||
ラズパイの場合は[こちらを参考に](https://qiita.com/k_ken/items/0f2d6af2618618982723) | ||
``` | ||
curl -sSL https://get.docker.com | sh | ||
sudo pip3 install docker-compose | ||
``` | ||
Windowsの場合は[こちらを参考に](https://qiita.com/KoKeCross/items/a6365af2594a102a817b) | ||
``` | ||
Windowsを2004以降のビルドにアップデート | ||
PowerShellを管理者として開く | ||
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux | ||
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform | ||
再起動する | ||
[WSL2をインストール](https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel) | ||
[Ubuntuをインストール](https://www.microsoft.com/store/apps/9n6svws3rx71) | ||
[Docker for Desktopをインストール](https://www.docker.com/products/docker-desktop) | ||
``` | ||
|
||
## 2 コンテナを実行 | ||
``` | ||
.env_exampleを.envとしてdockerフォルダにコピー | ||
(dockerフォルダ内に移動) | ||
.envに必要なトークンなどを書き込む | ||
docker-compose up | ||
``` | ||
|
||
## 3 nginxやApache2等のProxyPass/ProxyPassReverseの設定 | ||
``` | ||
各自で設定すること | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## 手動での稼働の流れ | ||
利用者がインストール時にすることのリスト | ||
|
||
## 1 ソースのクローン | ||
``` | ||
このリポジトリはサブモジュールを使っているので普通にzipで落とすと動きません | ||
``` | ||
## 2 pipでパッケージを揃える | ||
``` | ||
pip install -r requirements.txt | ||
pip install -r ./api/scraper-lib/requirements.txt | ||
``` | ||
|
||
## 3 nginxやApache2等のProxyPass/ProxyPassReverseの設定 | ||
``` | ||
各自で設定すること | ||
``` |