[WEB-3991] chore: local dev improvements (#6991)
* chore: local dev improvements * chore: pr feedback * chore: fix setup * fix: env variables updated in .env.example files * fix(local): sign in to admin and web * chore: update minio deployment to create an bucket automatically on startup. * chore: resolve merge conflict * chore: updated api env with live base path --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com> Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
This commit is contained in:
parent
1e46290727
commit
28f9733d1b
17 changed files with 234 additions and 166 deletions
15
setup.sh
15
setup.sh
|
|
@ -22,14 +22,14 @@ echo -e "${BOLD}Setting up your development environment...${NC}\n"
|
|||
copy_env_file() {
|
||||
local source=$1
|
||||
local destination=$2
|
||||
|
||||
|
||||
if [ ! -f "$source" ]; then
|
||||
echo -e "${RED}Error: Source file $source does not exist.${NC}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
cp "$source" "$destination"
|
||||
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo -e "${GREEN}✓${NC} Copied $destination"
|
||||
else
|
||||
|
|
@ -52,7 +52,7 @@ for service in "${services[@]}"; do
|
|||
if [ "$service" != "" ]; then
|
||||
prefix="./$service/"
|
||||
fi
|
||||
|
||||
|
||||
copy_env_file "${prefix}.env.example" "${prefix}.env" || success=false
|
||||
done
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ done
|
|||
if [ -f "./apiserver/.env" ]; then
|
||||
echo -e "\n${YELLOW}Generating Django SECRET_KEY...${NC}"
|
||||
SECRET_KEY=$(tr -dc 'a-z0-9' < /dev/urandom | head -c50)
|
||||
|
||||
|
||||
if [ -z "$SECRET_KEY" ]; then
|
||||
echo -e "${RED}Error: Failed to generate SECRET_KEY.${NC}"
|
||||
echo -e "${RED}Ensure 'tr' and 'head' commands are available on your system.${NC}"
|
||||
|
|
@ -74,6 +74,11 @@ else
|
|||
success=false
|
||||
fi
|
||||
|
||||
# Activate Yarn (version set in package.json)
|
||||
corepack enable yarn || success=false
|
||||
# Install Node dependencies
|
||||
yarn install || success=false
|
||||
|
||||
# Summary
|
||||
echo -e "\n${YELLOW}Setup status:${NC}"
|
||||
if [ "$success" = true ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue