Docker Compose makes it easier to define and run services using a single configuration file.
DevScribe lets you create and execute Docker Compose configurations directly from your development workspace, making it possible to manage local services alongside your other project resources.
Why Use Docker Compose?
Development projects often depend on services such as MySQL, MongoDB, Redis, or other containers.
Instead of starting and configuring each service separately, Docker Compose lets you define the required services in a YAML configuration and start them together.
Using Docker Compose within DevScribe also keeps your service configuration close to your documentation, code, API resources, and database workflows.
Creating a Docker Compose Configuration
Open the Docker Compose tool in DevScribe and create a new Compose configuration.
For example, you can define a local MySQL service:
services:
mysql:
image: mysql:8
container_name: quickcart-mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: quickcart
ports:
- "3308:3306"This configuration defines the MySQL service, specifies the Docker image, sets the database credentials, and maps the container port to the local machine.
You can modify the configuration based on the services required by your project.
Running the Docker Compose Configuration
Once the configuration is ready, click Up in the Docker Compose tool.
DevScribe executes the Compose configuration and starts the services defined in the file.
A successful execution is displayed directly in the workspace, allowing you to confirm that the configuration has been started successfully.
Managing Your Development Services
Once your Compose services are running, they can be used by other parts of your development workflow.
For example, the MySQL service above is available locally through:
- Host:
localhost - Port:
3308 - Database:
quickcart - Username:
root
You can then connect to the running database using DevScribe’s Database tools or other applications.
When Is Docker Compose Useful?
Docker Compose is useful when:
- Your project depends on multiple services
- You need local development databases
- You want to define infrastructure in a repeatable configuration
- You frequently start and stop development services
- You want your service configuration available alongside your project resources
Keep Your Development Environment Together
Docker Compose provides a simple way to define the services your project needs, while DevScribe lets you manage those configurations alongside the rest of your development workflow.
Define your services, click Up, and get back to building.
One configuration. Multiple services. One workspace.
Here’s a walkthrough: