Docker

How to run DocsHub using docker

2024-09-04
2 min read
Roberto

Running docshub with docker

There are 2 ways to run Docshub with docker:

  1. Interactive Mode (Editing Mode).
  2. Standard Mode (Production Mode).

These instructions are based on the docker-compose.yml file, which can either be found in the repository or created by the DocsHub CLI when initializing the workspace.

Interactive mode

Interactive Mode provides Docshub in development mode, allowing you to edit and view changes in real time.

docker compose --profile interactive up -d

The application should be available at http://localhost:4321.

Standard mode

Standard Mode is the build mode, used to create your site with the finalized documentation.

docker compose --profile standard up -d

The application should be available at http://localhost:4321.

Environment

The DocsHub docker-compose.yml supports an environment file named .env in the same directory, though it’s not required for execution. This file helps customize your DocsHub setup.

To see the supported parameters for the .env file, you can refer to the documentation created for it:

Docker tags

When uploading the app, we use specific docker tags to differentiate between versions and their intended usage.

  1. latest: This tag represents the production version of the app. It is always the most stable and current version deployed to production.

  2. interactive: This tag represents the latest version of the app available for editing. It is typically used for development purposes and provides a version where developers can work on the app.

  3. x.y.z: This tag corresponds to the specific version of the app. For example, if the app is version 1.2.3, the tag would be 1.2.3.

  4. interactive-x.y.z: This is the versioned tag for the interactive version of the app. It is associated with the specific version number for the interactive build. For example, interactive-1.2.3.

  5. -next: This tag is used for the release candidate version of the app. It represents a version that is almost stable but still needs some final testing before it can become the official stable release.

  6. -dev: This tag is used for developer preview versions. These are experimental builds intended for developers to test new features or changes that may not be stable yet.