mirror of
https://github.com/docker/docs.git
synced 2026-03-27 22:38:54 +07:00
This patch updates the default configuration to match a "development"
situation, and introduces build-options to produce a "production"
build.
By default (dev environment):
- Google Analytics / GTM and PollDaddy are disabled
- SASS builds non-minified stylesheets (for easier readabililty)
- Excludes "enterprise" stubs
Building a "production" build locally is still possible by overriding
the `JEKYLL_ENV` build-arg;
JEKYLL_ENV=production docker-compose up --build
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
23 lines
779 B
YAML
23 lines
779 B
YAML
version: "3.7"
|
|
services:
|
|
docs:
|
|
# By default, docker-compose up --build builds docs for a development
|
|
# environment (no Google Analytics, omitting some enterprise redirects,
|
|
# etc.
|
|
#
|
|
# To test a "production" build, override the environment using:
|
|
#
|
|
# JEKYLL_ENV=production docker-compose up --build
|
|
build:
|
|
args:
|
|
# FIXME: docker-compose should behave the same as the docker CLI here
|
|
# and if `JEKYLL_ENV` is not set in the current environment, ignore
|
|
# the --build-arg, and use the default that's defined in the Dockerfile.
|
|
# Setting a default here as a workaround.
|
|
# - JEKYLL_ENV
|
|
- JEKYLL_ENV=${JEKYLL_ENV:-development}
|
|
context: .
|
|
image: docs/docstage
|
|
ports:
|
|
- "4000:4000"
|