refactor: update paths and structure for server services in Docker and documentation (#7333)

- Changed references from 'apiserver' to 'apps/server' in Docker configurations and environment setup.
- Updated contributing documentation to reflect the new service structure.
- Adjusted setup script to accommodate the new directory layout.
- Removed obsolete files related to the previous structure.
This commit is contained in:
Nikhil
2025-07-03 18:42:14 +05:30
committed by GitHub
parent 1de95ef0d0
commit 805cfed1a3
11 changed files with 105 additions and 94 deletions

View File

@@ -44,20 +44,23 @@ export LC_CTYPE=C
echo -e "${YELLOW}Setting up environment files...${NC}"
# Copy all environment example files
services=("" "web" "apiserver" "space" "admin" "live")
services=("" "web" "server" "space" "admin" "live")
success=true
for service in "${services[@]}"; do
prefix="./"
if [ "$service" != "" ]; then
prefix="./$service/"
if [ "$service" == "" ]; then
# Handle root .env file
prefix="./"
else
# Handle service .env files in apps folder
prefix="./apps/$service/"
fi
copy_env_file "${prefix}.env.example" "${prefix}.env" || success=false
done
# Generate SECRET_KEY for Django
if [ -f "./apiserver/.env" ]; then
if [ -f "./apps/server/.env" ]; then
echo -e "\n${YELLOW}Generating Django SECRET_KEY...${NC}"
SECRET_KEY=$(tr -dc 'a-z0-9' < /dev/urandom | head -c50)
@@ -66,11 +69,11 @@ if [ -f "./apiserver/.env" ]; then
echo -e "${RED}Ensure 'tr' and 'head' commands are available on your system.${NC}"
success=false
else
echo -e "SECRET_KEY=\"$SECRET_KEY\"" >> ./apiserver/.env
echo -e "${GREEN}${NC} Added SECRET_KEY to apiserver/.env"
echo -e "SECRET_KEY=\"$SECRET_KEY\"" >> ./apps/server/.env
echo -e "${GREEN}${NC} Added SECRET_KEY to apps/server/.env"
fi
else
echo -e "${RED}${NC} apiserver/.env not found. SECRET_KEY not added."
echo -e "${RED}${NC} apps/server/.env not found. SECRET_KEY not added."
success=false
fi