mirror of
https://github.com/labring/laf.git
synced 2026-01-25 16:07:45 +00:00
Intro
WARNING: This is a work in progress. The scripts are not yet ready for production use.
This script is used to deploy the v1.0 development environment. The v1.0 environment has not been released yet, so this script is only for laf contributors to use in the development environment.
Create development environment on Linux
cd deploy/scripts
# setup k8s cluster
sh install-k8s.sh
# setup laf core
sh install-laf-core.sh
Create development environment on MacOS
- Install multipass on MacOS
Skip this step if you have already installed multipass
brew install --cask multipass # or see https://multipass.run/install
- Create vm & deploy in it
cd deploy/scripts
# create vm & setup k8s in it
sh init-vm.sh
# setup laf core
multipass exec laf-dev -- sudo -u root sh /laf/deploy/scripts/install-laf-core.sh
- Start laf server
# Forward service in cluster to localhost, run this command in another terminal separately
kubectl port-forward deployment/mongodb 27017:27017 -n laf
kubectl port-forward deployments/casdoor 30070:8000 -n laf
# Run these in first time or when someone change the schema.
cd server
npm install
npx prisma db push
npx prisma generate
# run dev
npm run watch