Docker Compose Files

Estimated reading: 2 minutes 28 views

The Code Plugin allows you to create, execute, and maintain Docker Compose files alongside your project documentation, architecture diagrams, APIs, and database queries. Keeping your infrastructure configuration in the same workspace makes project setup, onboarding, and deployment significantly easier.

Common use cases include local development environments, database setup, Kafka and Redis clusters, microservice development, integration testing, and demo environments.


Creating a Docker Compose File

Create Docker Compose files just like any other code file in DevScribe.

How to Create

  1. Navigate to the folder where you want to create the Docker Compose file.
  2. Click the horizontal three-dot (⋯) More Options menu next to the folder.
  3. Select Add Code.
  4. Open the Language dropdown in the Code Editor.
  5. Select Docker Compose.

The editor is now configured for Docker Compose, allowing you to start writing your docker-compose.yml configuration.

Running a Docker Compose File

Once your Docker Compose configuration is ready, you can execute it directly from the Code Plugin.

How to Run

Once your Docker Compose configuration is ready, you can start and stop your local services directly from the Code Plugin.

Starting Services

  1. Open the Docker Compose file.
  2. Click the Up button.
  3. DevScribe executes the Docker Compose configuration on your local machine.
  4. Monitor the startup process and logs directly within the editor.

Stopping Services

If the Docker Compose services are already running:

  1. Click the Down button.
  2. DevScribe stops and removes the containers defined in the Docker Compose file.
  3. Review the execution logs directly within the editor.

This allows you to manage your complete local development environment without switching to a separate terminal or Docker management tool.


Embedding Docker Compose in Documentation

Docker Compose files can be embedded directly into your documentation, allowing setup instructions and infrastructure configurations to stay synchronized with the actual configuration.

How to Embed

  1. Open the documentation where you want to include the Docker Compose file.
  2. Type /.
  3. Select Link File.
  4. Choose the Docker Compose file as Embed.

The configuration is embedded directly into the document. If you later update the Docker Compose file, the embedded version is automatically updated since both reference the same underlying file.

Leave a Reply

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

Share this Doc

Docker Compose Files

Or copy link

CONTENTS