mirror of
https://github.com/labring/sealos.git
synced 2026-09-01 15:38:06 +08:00
9c22f0b9ec
* fix: Unsynchronized backup settings chore: create db table heading copyright adjust * chore: clean unused code * fix: Update the terminal version and use the built-in mc client * fix: comma * chore: duplicated key
sealos frontend
prepare dev host
# dev
echo '35.220.145.199 apiserver.cluster.local' | sudo tee -a /etc/hosts
# io
echo '35.240.227.100 apiserver.cluster.local' | sudo tee -a /etc/hosts
# cn
echo '121.41.82.246 apiserver.cluster.local' | sudo tee -a /etc/hosts
how to dev
-
It is best to use
sealos/frontendas the workspace directory to develop applications. -
Before dev, you should install
pnpmfirst. pnpm -
The
sealos/frontend/packages/*are local dependencies, you need runpnpm -r --filter ./packages/client-sdk run buildin thesealos/frontenddirectory tobuild them. -
The
sealos/frontend/providers/*are sub applications.. -
The
sealos/frontend/desktopis desktop app. -
add packages
cd frontend
# add remote
pnpm --filter=<path> -r add <package>
# such as:
# pnpm --filter=providers/costcenter -r add lodash
# pnpm --filter=desktop -r add lodash
# add local
pnpm --filter=<path> -r --offline add <package>
# such as:
# pnpm --filter=providers/costcenter -r --offline add sealos-desktop-sdk
# pnpm --filter=desktop -r --offline add sealos-desktop-sdk
how to build
# sealos/frontend
make image-build-<app> DOCKER_USERNAME=<your_account> IMAGE_TAG=<tag>
# such as:
# make image-build-providers/costcenter
# make image-build-desktop
# make image-build-desktop IMAGE_TAG=test DOCKER_USERNAME=sealos
# multi jobs build
make -j
- you can use
make all DOCKER_USERNAME=<your_account>to build all apps for your account. - you can user
make all IMAGE_TAG=<tag>to build all apps and customize tag (default:dev)
how to publish image
# sealos/frontend
make image-push-<app> DOCKER_USERNAME=<your_account> IMAGE_TAG=<tag>
# such as:
# make image-push-providers/costcenter
# make image-push-desktop
# publish all
make push-images DOCKER_USERNAME=<your_account> IMAGE_TAG=<tag>
new App
Refer to other apps to add some configuration.
- .github/workflows/frontends.yml
- deploy/cloud/init.sh
- deploy/cloud/scripts/init.sh
- frontend/providers/app/deploy/manifests/appcr.yaml.tmpl
- frontend/providers/app/deploy/manifests/deploy.yaml
- frontend/providers/app/deploy/manifests/ingress.yaml.tmpl
- makefile
multiple namespaces
In order to support multiple namespaces, the method of obtaining 'namespace' in the backend should be replaced with the method of obtaining it from 'kubeconfig' instead of adding 'ns-' to 'user' for generation purpose.