build(elixir): add dev container
This commit is contained in:
39
.devcontainer/setup.sh
Executable file
39
.devcontainer/setup.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user