Running Docker Compose in DevScribe

2 min read

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:

⚡ Open This Article in DevScribe

Want to save this?
Open in DevScribe

Save this article directly to DevScribe and work on it offline. Edit, annotate, run code examples, and keep all your developer notes in one place.

Leave a Reply

Your email address will not be published. Required fields are marked *

Join the Conversation

Stay Updated with Us

At Devscribe, we promote a lively space for developers to share insights and experiences. Our blog is not just a source of useful articles, but a gathering place where you can connect with like-minded individuals. Join us as we explore trending topics and collaborate on solutions.
Ready to make your voice heard?

By clicking Join Now, you agree to our Terms and Conditions.