Damp

Migrate from Laravel Sail

Switch from Sail to DAMP DevContainers

Switch from Laravel Sail to DAMP and get VS Code DevContainers, named volumes, and visual service management.

Why Migrate?

FeatureSailDAMP
Visual Management❌ CLI only✅ GUI app
Named Volumes⚠️ Manual✅ Automatic
Multiple Projects⚠️ Port conflicts✅ Auto-assigned ports
HTTPS❌ Manual setup✅ Built-in

Keep Your Code

DAMP replaces docker-compose.yml with DevContainers - your Laravel code stays the same!

Migration Process

Stop Sail

Stop all Sail containers:

# In your project directory
./vendor/bin/sail down

This frees up ports and stops services.

Open DAMP

Launch DAMP and click "Add Site" button.

Select "Existing Project"

Choose the Existing Project option.

Configure Site

Fill in the details:

FieldValueExample
NameYour site namemy-sail-app
PathYour project folderC:\Projects\my-sail-app
PHP VersionMatch docker-compose.yml8.3

Install Services

Check your docker-compose.yml services and install equivalents:

Sail ServiceDAMP ServiceInstall?
mysqlMySQL✅ Required
redisRedis✅ If using
meilisearchMeilisearch✅ If using
mailpitMailpit✅ Recommended

Go to Services page → Click "Install" for each needed service.

Update .env File

Open project in VS Code DevContainer and update .env:

# Old Sail config
DB_HOST=mysql
REDIS_HOST=redis
MEILISEARCH_HOST=http://meilisearch:7700

# New DAMP config
DB_HOST=damp-mysql
REDIS_HOST=damp-redis
MEILISEARCH_HOST=http://damp-meilisearch:7700

# Mail
MAIL_HOST=damp-mailpit
MAIL_PORT=1025

Migrate Data (Optional)

If you have Sail database data:

Export from Sail:

./vendor/bin/sail mysql -u sail -p sail > backup.sql

Import to DAMP:

# Inside DevContainer terminal
mysql -h damp-mysql -u damp -pdamp damp < backup.sql

Test Your Site

  1. Open in VS Code: Click "Open in VS Code" in DAMP
  2. Reopen in Container when prompted
  3. Browse to https://yoursite.local
  4. Install SSL certificate if needed

What Changed

Files Replaced

DAMP replaces Sail files with DevContainer files:

Sail Files (can be deleted):

├── docker-compose.yml      ← Remove
├── docker/                 ← Remove
└── .env.example            ← Update

DAMP Files (added):

├── .devcontainer/          ← Added by DAMP
│   ├── devcontainer.json
│   ├── Dockerfile
│   └── xdebug.ini
└── .vscode/                ← Added by DAMP
    ├── launch.json
    └── settings.json

Clean Up

You can delete docker-compose.yml and the docker/ folder after migration!

Command Changes

Sail Commands:

./vendor/bin/sail up -d
./vendor/bin/sail artisan migrate
./vendor/bin/sail composer install
./vendor/bin/sail npm install

DAMP Equivalent:

# No "sail" prefix needed - run directly in DevContainer
php artisan migrate
composer install
npm install

Service Hostnames

Sail:

DB_HOST=mysql
REDIS_HOST=redis

DAMP:

DB_HOST=damp-mysql      # Prefixed with "damp-"
REDIS_HOST=damp-redis

Key Benefits

🎯 Better VS Code Integration

Sail: Run commands via ./vendor/bin/sail

DAMP: Native terminal inside DevContainer - no wrapper needed!

🚀 Named Volumes

Sail: Manual volume configuration

DAMP: Automatic named volumes for performance

🔒 HTTPS Out of the Box

Sail: Manual Nginx/Caddy setup

DAMP: HTTPS with Caddy included

🖥️ Visual Management

Sail: CLI commands only

DAMP: GUI for service installation, site management

Troubleshooting


Sail Aliases

Remove Sail aliases from your shell profile (.bashrc, .zshrc) after migration - you won't need them!