Deploy to one server page, and create-cwa's new questions
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 40/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- docker, github-actions, gitlab, kubernetes, shell
- Lĩnh vực
- cli, devops, documentation
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 0
- Fork
- 0
- Merge trung bình
- 1 giờ 20 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của components-web-app/docs
-
documentation
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
components-web-app/docs#290 · 2 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
components-web-app/docs#289 · 2 bình luận ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
components-web-app/docs#237 · 2 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
components-web-app/docs#1 · 3 bình luận ·
Tất cả issue của components-web-app/docs
Issue tương tự
-
ci-cd desktop size:low telemetry-improvement telemetry-round-1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
vfarcic/dot-agent-deck#2079 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Broken links in the docsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
status:in-linear
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
n8n-io/n8n#43006 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🔊 a11y
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
betagouv/mon-entreprise#4726 ·
Maintainer thường phản hồi trong vòng 9 ngày