logo
0
1
Login
Forkfromexamples/ecosystem/react-docker, ahead:main2 commits

Build React Image, Push to CNB Artifact Repository, and Deploy to CVM / Lighthouse via Docker

This example demonstrates how to use CNB to build a React project, build an image and push it to the CNB artifact repository, and deploy it to CVM / Lighthouse via Docker.

It also includes how to configure Pull Request code quality gates: eslint, unit tests, etc.

badge badge badge

Prerequisites

  1. Use Cloud Native Build (CNB) to build your project
  2. Environment variables and their usage: Environment Variables
  3. Declarative build cache
  4. Use SSH Plugin or tcloud-cmd to deploy to CVM / Lighthouse
  5. Plugins and their usage: Plugin Marketplace

Configure Secrets

  1. If you use SSH Plugin to deploy, you need to configure the secret
# react-docker-ssh-secret.yml REMOTE_HOST: xxx REMOTE_USERNAME: xxx REMOTE_PORT: xxx PRIVATE_KEY: | -----BEGIN RSA PRIVATE KEY----- xxxxxxxx -----END RSA PRIVATE KEY-----
  1. If you use tcloud-cmd to deploy to CVM, you need to configure the secret
# react-docker-tcloud-cmd-secret.yml SECRET_ID: xxx SECRET_KEY: xxx

About

No description, topics, or website provided.
1.21 MiB
0 forks1 stars8 branches0 TagREADMEMIT license

Sponsor

Language
JavaScript50.4%
HTML22.1%
Dockerfile15.6%
CSS12%