Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

インストーラー機能 #233

Closed
5 tasks done
uzulla opened this issue Feb 15, 2021 · 5 comments
Closed
5 tasks done

インストーラー機能 #233

uzulla opened this issue Feb 15, 2021 · 5 comments
Assignees

Comments

@uzulla
Copy link
Collaborator

uzulla commented Feb 15, 2021

レンサバ(FTPしか使えないサーバー)で運用をためしてみているが、流石にファイルが多すぎてデプロイに時間がかかる。
ZIPなど圧縮状態でアップロードしてサーバー上のPHP実行で解凍できるような機能がほしい。


@uzulla uzulla changed the title 圧縮状態でアップロードし、サーバー側で解凍(デプロイ)する機能 インストーラー機能 Mar 4, 2021
@uzulla
Copy link
Collaborator Author

uzulla commented Mar 4, 2021

自動アップデートでも活用する形を見据えて、インストーラー機能という内容に変更

@uzulla
Copy link
Collaborator Author

uzulla commented Mar 12, 2021

https://github.com/uzulla/fc2blog/blob/452e423781b1db39d505a8e66e6394da20a38741/dist_zip/installer/fc2blog_installer.php

インストーラーを実装した。fc2blog_installer.php のPHPファイル一つをhtdocs直下にアップロードし、ブラウザでひらくことで以下が行える。

  • 配布zip のDL(GitHubより、後述)
  • 解凍と、appなどの再配置
  • config.phpの生成(フォームへユーザー入力は必要)
  • この画面完了後、既存のインストーラー(/admin/common/install へリダイレクトされる)
  • (一気通貫な動作テストは該当ブランチにおいて、 /dist_zipmake testによってdockerで試せる)
  • ※ fc2blog自体にはext-zipは不要だが、このインストーラーを使う場合は必要

GithubのreleaseからzipをDLしてインストールすることができる。

ただし、現状は fc2blog/blog でなく、 uzulla/fc2blog のReleaseをチェックしている、このrepoにreleaseを打つ権限が私にはないため。

image

releaseをどのように打っていくか?

  • GitHubにReleaseを打ち、dist_zip/make buildしてできるzipをそのreleaseのassetとしてfc2blog_dist.zipとして添付する必要がある
    • GitHub ActionsのCIを活用することで、タグ打ちだけでリリースからzip生成登録まで自動化はできる
    • 現状、私はコミット件がないのでタグ打ちはできないため、どのように打っていくか取り決める必要があるかと思われる @fc2dev

note

  • この知見を活かした上で、アップデート機能を本体に実装予定。
  • 本来本機能のマージは本repoでreleaseを打てるようになってからすべきだろうが、時間がかかると乖離が進みそうなので一回アルファ版としてマージできればと考えている(いくつかの環境で動作を確認してからプルリク予定)。

@uzulla
Copy link
Collaborator Author

uzulla commented Mar 13, 2021

一部のレンサバなどで、shell_execなどが拒否されているために動かない箇所があったので修正し、動作を確認した。

uzulla added a commit to uzulla/fc2blog that referenced this issue Mar 14, 2021
- Change create filename, remove commit id from filename.
- Generate and add `app/version` file.
- Add build/test-no-pushed-branch task that not be require pushed branch when build.
uzulla added a commit to uzulla/fc2blog that referenced this issue Mar 14, 2021
uzulla added a commit to uzulla/fc2blog that referenced this issue Mar 14, 2021
@uzulla
Copy link
Collaborator Author

uzulla commented Mar 16, 2021

#264 にて fc2blog_installer.phpに既存インストールをアップデートする機能を実装した(これ以前のインストールには非対応)、マージ後にクローズ予定。

@uzulla
Copy link
Collaborator Author

uzulla commented Mar 21, 2021

マージいただきましたので、クローズいたします。

@uzulla uzulla closed this as completed Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant