Update directory paths from ~/homelab/ to ~/hops/
- Changed macOS deployment directory from ~/homelab/ to ~/hops/ - Updated all core scripts to use new path structure: • Main working directory: ~/hops/ • Config directory: ~/hops/config/ • Media directory: ~/hops/media/ • Environment file: ~/hops/.env - Updated documentation in CLAUDE.md and README.md - Changed log file naming from homelab-* to hops-* - Linux paths remain unchanged (/opt/appdata, /mnt/media) Benefits: - Better brand consistency with project name - Cleaner, more professional directory structure - Shorter, easier to remember paths - Immediately obvious what directory belongs to HOPS 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -86,7 +86,7 @@ sudo tail -f /var/log/hops/hops-main-*.log
|
||||
sudo tail -f /usr/local/var/log/hops/hops-main-*.log
|
||||
|
||||
# View Docker Compose logs
|
||||
cd ~/homelab && docker compose logs -f [service-name]
|
||||
cd ~/hops && docker compose logs -f [service-name]
|
||||
```
|
||||
|
||||
## Service Architecture
|
||||
@@ -96,7 +96,7 @@ All services follow a standardized Docker Compose pattern:
|
||||
- LinuxServer.io containers with PUID/PGID/TZ environment variables
|
||||
- Platform-aware volume mounting:
|
||||
- **Linux**: `/opt/appdata` for configs, `/mnt/media` for data
|
||||
- **macOS**: `/Users/[user]/homelab/config` for configs, `/Users/[user]/homelab/media` for data
|
||||
- **macOS**: `/Users/[user]/hops/config` for configs, `/Users/[user]/hops/media` for data
|
||||
- Health checks for web services
|
||||
- Unified network configuration (`homelab` network)
|
||||
- Restart policy: `unless-stopped`
|
||||
@@ -114,7 +114,7 @@ All services follow a standardized Docker Compose pattern:
|
||||
|
||||
### Linux File Structure
|
||||
```
|
||||
~/homelab/ # Main deployment directory
|
||||
~/hops/ # Main deployment directory
|
||||
├── docker-compose.yml # Generated service definitions
|
||||
├── .env # Environment variables
|
||||
└── logs/ # Application logs
|
||||
@@ -131,7 +131,7 @@ All services follow a standardized Docker Compose pattern:
|
||||
|
||||
### macOS File Structure
|
||||
```
|
||||
~/homelab/ # Main deployment directory
|
||||
~/hops/ # Main deployment directory
|
||||
├── docker-compose.yml # Generated service definitions
|
||||
├── .env # Environment variables
|
||||
├── logs/ # Application logs
|
||||
@@ -146,7 +146,7 @@ All services follow a standardized Docker Compose pattern:
|
||||
|
||||
## Environment Configuration
|
||||
|
||||
Key environment variables in `~/homelab/.env`:
|
||||
Key environment variables in `~/hops/.env`:
|
||||
- `PUID`/`PGID`: User/group IDs for file permissions
|
||||
- `TZ`: Timezone configuration
|
||||
- `DATA_ROOT`: Media storage location
|
||||
|
||||
@@ -162,7 +162,7 @@ The installer will provide URLs for all deployed services:
|
||||
## 📁 Default Directory Structure
|
||||
|
||||
```
|
||||
~/homelab/ # Main homelab directory
|
||||
~/hops/ # Main deployment directory
|
||||
├── docker-compose.yml # Service definitions
|
||||
├── .env # Environment variables
|
||||
└── logs/ # Application logs
|
||||
@@ -210,7 +210,7 @@ Configuration is now stored encrypted for enhanced security:
|
||||
./lib/secrets.sh get PUID # Get values
|
||||
./lib/secrets.sh list # List all keys
|
||||
|
||||
# Legacy: Plaintext configuration in ~/homelab/.env
|
||||
# Legacy: Plaintext configuration in ~/hops/.env
|
||||
PUID=1000 # User ID
|
||||
PGID=1000 # Group ID
|
||||
TZ=America/New_York # Timezone
|
||||
@@ -237,7 +237,7 @@ ACME_EMAIL=admin@yourdomain.com
|
||||
./user-operations stop # Stop all services
|
||||
|
||||
# Legacy: Direct Docker Compose commands
|
||||
cd ~/homelab
|
||||
cd ~/hops
|
||||
docker compose ps # View running services
|
||||
docker compose logs -f [service-name] # View logs
|
||||
docker compose restart [service-name] # Restart specific service
|
||||
@@ -302,7 +302,7 @@ sudo ./hops.sh
|
||||
#### Service Won't Start
|
||||
```bash
|
||||
# Check service logs
|
||||
cd ~/homelab
|
||||
cd ~/hops
|
||||
docker compose logs [service-name]
|
||||
|
||||
# Restart service
|
||||
@@ -334,7 +334,7 @@ sudo chown -R $USER:$USER /mnt/media /opt/appdata
|
||||
sudo tar -czf hops-config-backup.tar.gz /opt/appdata
|
||||
|
||||
# Backup compose files
|
||||
cp ~/homelab/.env ~/homelab/docker-compose.yml /backup/location/
|
||||
cp ~/hops/.env ~/hops/docker-compose.yml /backup/location/
|
||||
```
|
||||
|
||||
### Recovery
|
||||
@@ -343,7 +343,7 @@ cp ~/homelab/.env ~/homelab/docker-compose.yml /backup/location/
|
||||
sudo tar -xzf hops-config-backup.tar.gz -C /
|
||||
|
||||
# Redeploy services
|
||||
cd ~/homelab
|
||||
cd ~/hops
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
|
||||
@@ -158,10 +158,10 @@ check_system_requirements() {
|
||||
get_installation_status() {
|
||||
local status="not_installed"
|
||||
local homelab_dirs=(
|
||||
"$HOME/homelab"
|
||||
"/home/*/homelab"
|
||||
"/opt/homelab"
|
||||
"/srv/homelab"
|
||||
"$HOME/hops"
|
||||
"/home/*/hops"
|
||||
"/opt/hops"
|
||||
"/srv/hops"
|
||||
)
|
||||
|
||||
# Check for existing installation
|
||||
|
||||
@@ -591,7 +591,7 @@ EOF
|
||||
# DOCKER COMPOSE FILE GENERATION
|
||||
# --------------------------------------------
|
||||
generate_docker_compose() {
|
||||
local HOMELAB_DIR="$HOME/homelab"
|
||||
local HOMELAB_DIR="$HOME/hops"
|
||||
mkdir -p "$HOMELAB_DIR"
|
||||
cd "$HOMELAB_DIR"
|
||||
|
||||
@@ -778,7 +778,7 @@ EOF
|
||||
find "$APPDATA_DIR" -name "*.pem" -exec chmod 600 {} \; 2>/dev/null || true
|
||||
|
||||
# Set secure permissions on homelab directory
|
||||
chmod 750 "$HOME/homelab"
|
||||
chmod 750 "$HOME/hops"
|
||||
|
||||
log "✅ Security hardening applied"
|
||||
}
|
||||
@@ -884,7 +884,7 @@ EOF
|
||||
|
||||
log "📋 Deployment Summary:"
|
||||
echo -e "\n📂 Configuration:"
|
||||
echo " • Homelab Directory: $HOME/homelab"
|
||||
echo " • Homelab Directory: $HOME/hops"
|
||||
echo " • Application Data: $APPDATA_DIR"
|
||||
echo " • Media Directory: $MEDIA_DIR"
|
||||
echo " • User/Group: $RUNNING_USER ($PUID:$PGID)"
|
||||
|
||||
+9
-9
@@ -433,12 +433,12 @@ check_docker_access() {
|
||||
# Generate Docker Compose configuration
|
||||
generate_docker_compose() {
|
||||
local services=("$@")
|
||||
local compose_file="$HOME/homelab/docker-compose.yml"
|
||||
local compose_file="$HOME/hops/docker-compose.yml"
|
||||
|
||||
info "📝 Generating Docker Compose configuration..."
|
||||
|
||||
# Create homelab directory
|
||||
mkdir -p "$HOME/homelab"
|
||||
mkdir -p "$HOME/hops"
|
||||
|
||||
# Generate compose file header
|
||||
cat > "$compose_file" << EOF
|
||||
@@ -473,7 +473,7 @@ EOF
|
||||
|
||||
# Deploy services
|
||||
deploy_services() {
|
||||
local compose_file="$HOME/homelab/docker-compose.yml"
|
||||
local compose_file="$HOME/hops/docker-compose.yml"
|
||||
|
||||
if [[ ! -f "$compose_file" ]]; then
|
||||
error_exit "Docker Compose file not found: $compose_file"
|
||||
@@ -481,7 +481,7 @@ deploy_services() {
|
||||
|
||||
info "🚀 Deploying services..."
|
||||
|
||||
cd "$HOME/homelab"
|
||||
cd "$HOME/hops"
|
||||
|
||||
# Pull images
|
||||
if docker compose pull; then
|
||||
@@ -500,7 +500,7 @@ deploy_services() {
|
||||
|
||||
# Stop services
|
||||
stop_services() {
|
||||
local compose_file="$HOME/homelab/docker-compose.yml"
|
||||
local compose_file="$HOME/hops/docker-compose.yml"
|
||||
|
||||
if [[ ! -f "$compose_file" ]]; then
|
||||
error_exit "Docker Compose file not found: $compose_file"
|
||||
@@ -508,7 +508,7 @@ stop_services() {
|
||||
|
||||
info "🛑 Stopping services..."
|
||||
|
||||
cd "$HOME/homelab"
|
||||
cd "$HOME/hops"
|
||||
|
||||
if docker compose down; then
|
||||
success "Services stopped successfully"
|
||||
@@ -519,7 +519,7 @@ stop_services() {
|
||||
|
||||
# Show service status
|
||||
show_service_status() {
|
||||
local compose_file="$HOME/homelab/docker-compose.yml"
|
||||
local compose_file="$HOME/hops/docker-compose.yml"
|
||||
|
||||
if [[ ! -f "$compose_file" ]]; then
|
||||
error_exit "Docker Compose file not found: $compose_file"
|
||||
@@ -527,7 +527,7 @@ show_service_status() {
|
||||
|
||||
info "📊 Service status:"
|
||||
|
||||
cd "$HOME/homelab"
|
||||
cd "$HOME/hops"
|
||||
docker compose ps
|
||||
}
|
||||
|
||||
@@ -563,7 +563,7 @@ main() {
|
||||
if [[ $# -eq 0 ]]; then
|
||||
error_exit "Usage: $0 logs <service_name>"
|
||||
fi
|
||||
cd "$HOME/homelab"
|
||||
cd "$HOME/hops"
|
||||
docker compose logs -f "$1"
|
||||
;;
|
||||
|
||||
|
||||
+4
-4
@@ -379,7 +379,7 @@ run_system_checks() {
|
||||
# Get platform-specific default paths
|
||||
get_default_media_path() {
|
||||
if [[ "$OS_NAME_LOWER" == "macos" ]]; then
|
||||
echo "/Users/$USER/homelab/media"
|
||||
echo "/Users/$USER/hops/media"
|
||||
else
|
||||
echo "/mnt/media"
|
||||
fi
|
||||
@@ -387,7 +387,7 @@ get_default_media_path() {
|
||||
|
||||
get_default_config_path() {
|
||||
if [[ "$OS_NAME_LOWER" == "macos" ]]; then
|
||||
echo "/Users/$USER/homelab/config"
|
||||
echo "/Users/$USER/hops/config"
|
||||
else
|
||||
echo "/opt/appdata"
|
||||
fi
|
||||
@@ -395,9 +395,9 @@ get_default_config_path() {
|
||||
|
||||
get_default_homelab_path() {
|
||||
if [[ "$OS_NAME_LOWER" == "macos" ]]; then
|
||||
echo "/Users/$USER/homelab"
|
||||
echo "/Users/$USER/hops"
|
||||
else
|
||||
echo "/home/$USER/homelab"
|
||||
echo "/home/$USER/hops"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ uninstall_hops() {
|
||||
# LOGGING SETUP
|
||||
# --------------------------------------------
|
||||
local LOG_DIR="/var/log/hops"
|
||||
local LOG_FILE="$LOG_DIR/homelab-uninstall-$(date +%Y%m%d-%H%M%S).log"
|
||||
local LOG_FILE="$LOG_DIR/hops-uninstall-$(date +%Y%m%d-%H%M%S).log"
|
||||
mkdir -p "$LOG_DIR"
|
||||
touch "$LOG_FILE"
|
||||
|
||||
@@ -125,16 +125,16 @@ EOF
|
||||
# --------------------------------------------
|
||||
find_homelab_directory() {
|
||||
local POSSIBLE_DIRS=(
|
||||
"$HOME/homelab"
|
||||
"/home/*/homelab"
|
||||
"/opt/homelab"
|
||||
"/srv/homelab"
|
||||
"$HOME/hops"
|
||||
"/home/*/hops"
|
||||
"/opt/hops"
|
||||
"/srv/hops"
|
||||
)
|
||||
|
||||
# Try to find from running user's home first
|
||||
if [[ -n "$SUDO_USER" ]]; then
|
||||
local user_home=$(eval echo "~$SUDO_USER")
|
||||
POSSIBLE_DIRS=("$user_home/homelab" "${POSSIBLE_DIRS[@]}")
|
||||
POSSIBLE_DIRS=("$user_home/hops" "${POSSIBLE_DIRS[@]}")
|
||||
fi
|
||||
|
||||
HOMELAB_DIR=""
|
||||
|
||||
+9
-9
@@ -29,12 +29,12 @@ check_docker_access() {
|
||||
# Generate Docker Compose configuration
|
||||
generate_docker_compose() {
|
||||
local services=("$@")
|
||||
local compose_file="$HOME/homelab/docker-compose.yml"
|
||||
local compose_file="$HOME/hops/docker-compose.yml"
|
||||
|
||||
info "📝 Generating Docker Compose configuration..."
|
||||
|
||||
# Create homelab directory
|
||||
mkdir -p "$HOME/homelab"
|
||||
mkdir -p "$HOME/hops"
|
||||
|
||||
# Generate compose file header
|
||||
cat > "$compose_file" << EOF
|
||||
@@ -69,7 +69,7 @@ EOF
|
||||
|
||||
# Deploy services
|
||||
deploy_services() {
|
||||
local compose_file="$HOME/homelab/docker-compose.yml"
|
||||
local compose_file="$HOME/hops/docker-compose.yml"
|
||||
|
||||
if [[ ! -f "$compose_file" ]]; then
|
||||
error_exit "Docker Compose file not found: $compose_file"
|
||||
@@ -77,7 +77,7 @@ deploy_services() {
|
||||
|
||||
info "🚀 Deploying services..."
|
||||
|
||||
cd "$HOME/homelab"
|
||||
cd "$HOME/hops"
|
||||
|
||||
# Pull images
|
||||
if docker compose pull; then
|
||||
@@ -96,7 +96,7 @@ deploy_services() {
|
||||
|
||||
# Stop services
|
||||
stop_services() {
|
||||
local compose_file="$HOME/homelab/docker-compose.yml"
|
||||
local compose_file="$HOME/hops/docker-compose.yml"
|
||||
|
||||
if [[ ! -f "$compose_file" ]]; then
|
||||
error_exit "Docker Compose file not found: $compose_file"
|
||||
@@ -104,7 +104,7 @@ stop_services() {
|
||||
|
||||
info "🛑 Stopping services..."
|
||||
|
||||
cd "$HOME/homelab"
|
||||
cd "$HOME/hops"
|
||||
|
||||
if docker compose down; then
|
||||
success "Services stopped successfully"
|
||||
@@ -115,7 +115,7 @@ stop_services() {
|
||||
|
||||
# Show service status
|
||||
show_service_status() {
|
||||
local compose_file="$HOME/homelab/docker-compose.yml"
|
||||
local compose_file="$HOME/hops/docker-compose.yml"
|
||||
|
||||
if [[ ! -f "$compose_file" ]]; then
|
||||
error_exit "Docker Compose file not found: $compose_file"
|
||||
@@ -123,7 +123,7 @@ show_service_status() {
|
||||
|
||||
info "📊 Service status:"
|
||||
|
||||
cd "$HOME/homelab"
|
||||
cd "$HOME/hops"
|
||||
docker compose ps
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ main() {
|
||||
if [[ $# -eq 0 ]]; then
|
||||
error_exit "Usage: $0 logs <service_name>"
|
||||
fi
|
||||
cd "$HOME/homelab"
|
||||
cd "$HOME/hops"
|
||||
docker compose logs -f "$1"
|
||||
;;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user