Make sure to initialize the workspace before attempting to run DocsHub with Docker. For proper functionality, the entire workspace structure should be present in the directory where you intend to run it. You can easily generate this workspace using the DocsHub CLI!
Running docshub with docker
There are 2 ways to run Docshub with docker:
- Interactive Mode (Editing Mode).
- 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
By default, use the interactive docker tag.
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
By default, use the latest docker tag.
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.
-
latest
: This tag represents the production version of the app. It is always the most stable and current version deployed to production. -
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. -
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 be1.2.3
. -
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
. -
-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. -
-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.