Deploy to one server page, and create-cwa's new questions
还没有人认领这个 Issue。
评估
- 难度
- 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 分钟
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
components-web-app/docs 的其他 Issue
-
documentation
难度 4/5 3-5 天 新手友好度 45/100
components-web-app/docs#290 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 35/100
components-web-app/docs#289 · 2 条评论 ·
-
enhancement
难度 5/5 一周以上 新手友好度 15/100
components-web-app/docs#237 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 35/100
components-web-app/docs#1 · 3 条评论 ·
查看 components-web-app/docs 的全部 Issue
相似的 Issue
-
Remove unused dependencies可能已有人在做 @alastair-smith 今天认领。 未关闭chore other
难度 2/5 1-3 小时 新手友好度 78/100
alastair-smith/card-games#384 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
code-yeongyu/senpi#5571 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
nexu-io/open-design#9262 · 1 条评论 ·
维护者通常 1 天内回复
-
friction
难度 2/5 1-3 小时 新手友好度 72/100
kentcdodds/kody#4753 ·
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 62/100
lingdojo/kana-dojo#33508 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复