Installing Base Services
This guide explains how to quickly install the essential services needed for development: a SQL database engine, Mailpit for email testing, and phpMyAdmin for database management.
Overviewβ
Base services are shared tools that can be used by multiple applications. The main services you'll need are:
- SQL Database Engine: MySQL or MariaDB for storing application data
- Mailpit: Email testing tool that intercepts all outgoing emails
- phpMyAdmin: Web-based MySQL administration tool
Installing Servicesβ
Step 1: Install a SQL Database Engineβ
First, you need to choose and install a SQL database engine. DevSpaces supports both MySQL and MariaDB.
dvs service install mysql
Or for MariaDB:
dvs service install mariadb
The installation process will:
- Download the Docker image
- Create the service container
- Configure the database server
- Set up default credentials
Note: If you don't specify a service name, DevSpaces will show an interactive menu to choose from available services.
Step 2: Install Mailpitβ
Mailpit is automatically configured to intercept emails sent by your applications. Install it with:
dvs service install mailpit
Once installed, Mailpit will be available at https://mailpit.svc.dvs.sh.
Step 3: Install phpMyAdminβ
phpMyAdmin allows you to manage your databases through a web interface. Install it with:
dvs service install phpmyadmin
Note: phpMyAdmin will automatically detect installed SQL services and allow you to switch between them.
phpMyAdmin will be available at https://phpmyadmin.svc.dvs.sh.
Verifying Installationβ
Check that all services are installed and running:
dvs service list
Default SQL Serviceβ
When creating applications, DevSpaces will automatically use the first installed SQL service as the default database server. If you have multiple SQL services installed, you can specify which one to use when creating an application.
Next Stepsβ
- Learn how to create a PrestaShop site
- Learn how to create a WordPress site
- Learn how to access Mailpit
- Learn how to use phpMyAdmin