Deploy to one server page, and create-cwa's new questions
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 40/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- docker, github-actions, gitlab, kubernetes, shell
- 領域
- cli, devops, documentation
調査の方向性
Start with the scripts this page describes: bin/server/init, bin/server/deploy.sh, bin/server/backup.sh, bin/server/restore.sh, bin/server/cron.example, bin/devops/server-deploy.sh and the server.yml workflow, plus commits 1aec0c9 and d84cbe7 in components-web-app. Done means a new deployment page marked as preview that covers setup, first deploy, later deploys, the CI variables, backups and the move to Kubernetes, and create-cwa docs that cover the new questions and flags.
索引モデルが issue の本文から書いたものです。
説明
From components-web-app #212, now on main (commits 1aec0c9 and d84cbe7, in the next release). The docs describe current main.
1. A "Deploy to one server" page (new, under deployment). Mark it as a preview: no production site has run on it yet.
- Server setup: Docker with the compose plugin, rsync and curl, and a
deployuser in thedockergroup with the pipeline's public key. - First deploy: run the CI job once, which copies the files and then stops. On the server, run
cd cwa && sh bin/server/init(it writes.env.prod, mode 600: secrets, JWT keys,SITE_HOST,SITE_ALIASES,MAILER_DSN), thensh bin/server/deploy.sh --fixtures. - Every later deploy is GitLab's manual
production serverjob or GitHub's "Deploy to server" workflow (server.yml). Both runbin/devops/server-deploy.sh, which copies the commit with rsync and runsbin/server/deploy.shthere. That builds, backs up before pending migrations, starts app then php, purges, generates image variants and warms the cache. rsync never sends or deletes what git ignores (.env.prod,backups/). - Variables:
CWA_CI_SERVER_HOSTmakes the project single-server: every Kubernetes job skips. Don't make it Protected.CWA_CI_SERVER_SSH_KEY: a secret, the key as is or as base64 on one line.CWA_CI_SERVER_KNOWN_HOSTS: required, the output ofssh-keyscan. Host keys are always checked.- Optional:
CWA_CI_SERVER_USER(deploy),CWA_CI_SERVER_PORT(22),CWA_CI_SERVER_PATH(cwa, under the user's home).
- Backups and restore:
bin/server/backup.sh(database dump, media and Caddy certificates, keeping 5) andrestore.sh. Add a note that a backup on the same disk isn't a backup. Daily jobs:bin/server/cron.example. - Moving from one server to Kubernetes:
- rsync the media into
GCLOUD_PATH_PREFIX; - take a final dump in maintenance mode;
- set the secrets as CI variables (the deploy reads them first);
- deploy with the staging issuer first, then switch to
letsencrypt-prod.
- rsync the media into
Images: the server builds them today. Pulling the images CI built is being added next; I'll comment here when it lands.
2. The create-cwa page:
- Pipeline: GitHub Actions, GitLab CI, or "None yet".
- "Deploy to?" (only with a pipeline): a Kubernetes cluster, or one server with Docker (preview).
--deploy kubernetes|server. - Components, renamed by what an editor gets:
- Navigation menu, Rich text (TipTap), Images, Blog, Nested pages, Example form.
- The first three are pre-selected, and are what
--yesand--cipick (was none). --features default|all|none|a,b.
- "Start with example pages?" replaces the fixtures yes/no.
--content demo|home|empty;--fixturesand--no-fixturesstill work, as demo and empty.- demo: a home page plus an example of each chosen component;
- home: just the layout and a home page;
- empty: only the admin login.
- The generated README has a deploy section for the chosen target.
- 主要言語
- TypeScript
- スター
- 0
- フォーク
- 0
- 平均マージ
- 1時間 20分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
components-web-app/docs のほかの issue
-
documentation
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
components-web-app/docs#290 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
components-web-app/docs#289 · コメント 2 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
components-web-app/docs#237 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
components-web-app/docs#1 · コメント 3 件 ·
components-web-app/docs の issue をすべて見る
似ている issue
-
area: cli bug flake ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
gazetta-studio/gazetta-studio#1772 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
microsoft/playwright#43875 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
calagopus/panel#285 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信