Files
component-system/.devcontainer/setup.sh
2025-09-16 14:01:09 +02:00

39 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Setup script for Elixir Phoenix development environment
echo "🚀 Setting up Elixir Phoenix development environment..."
# Install dependencies
echo "📦 Installing Elixir dependencies..."
mix deps.get
# Install Node.js dependencies for assets
echo "📦 Installing Node.js dependencies..."
cd assets && npm install && cd ..
# Create and migrate database
echo "🗃️ Setting up database..."
mix ecto.create
mix ecto.migrate
# Run seeds if they exist
if [ -f priv/repo/seeds.exs ]; then
echo "🌱 Running database seeds..."
mix run priv/repo/seeds.exs
fi
# Compile the project
echo "🔨 Compiling project..."
mix compile
echo "✅ Development environment setup complete!"
echo ""
echo "🎯 Quick start commands:"
echo " mix phx.server - Start the Phoenix server"
echo " mix test - Run tests"
echo " mix deps.get - Install dependencies"
echo " mix ecto.migrate - Run database migrations"
echo " mix ecto.reset - Reset database"
echo ""
echo "🌐 Phoenix server will be available at http://localhost:4000"