Files
wace_plm/start-dev-full-win.sh
chpark da06c4684c Initial commit: WACE PLM with database initialization features
- Add Docker Compose configurations for dev, prod, and standalone environments
- Add database initialization scripts (init-db.sh, init-db-docker.sh)
- Add enhanced start-docker-linux.sh with DB init support
- Add comprehensive database initialization guide
- Support for automatic dbexport.pgsql import on first run
- Include safety checks for production environment
2025-08-29 15:46:08 +09:00

55 lines
1.5 KiB
Bash

#!/bin/bash
# MAC OS 및 Windows WSL에서 실행 가능
current_os=$(uname -s)
if [[ "$current_os" != "Darwin" && "$current_os" != "Linux" ]]; then
echo "This script runs on MAC OS or Windows WSL only."
echo "Current OS: $current_os"
exit 1
fi
# WSL 환경인지 확인
if [[ "$current_os" == "Linux" ]]; then
# WSL 환경 체크 (Windows Subsystem for Linux)
if ! grep -qi microsoft /proc/version 2>/dev/null && ! grep -qi wsl /proc/version 2>/dev/null; then
echo "This script runs on MAC OS or Windows WSL only."
echo "Current environment: Linux (not WSL)"
exit 1
fi
echo "Running on Windows WSL environment..."
elif [[ "$current_os" == "Darwin" ]]; then
echo "Running on MAC OS environment..."
fi
# Git 관련 스크립트 실행
./dev_git_only.sh
echo "Starting Development Environment..."
# 환경 변수 파일 로드
if [ -f .env.development ]; then
echo "Loading development environment variables..."
set -a
source .env.development
set +a
else
echo "Error: .env.development file not found!"
exit 1
fi
export NODE_ENV=development
# 이전 컨테이너 정리
docker-compose -f docker-compose.dev.win.yml down
echo "Pruning Docker system..."
# 컨테이너 정리
docker system prune -af
docker image prune -af
docker volume prune -af
# 컨테이너 상태 확인
echo "Checking container status..."
docker-compose -f docker-compose.dev.win.yml up --build --force-recreate -d
echo "Development environment setup complete!"