This updates the instructions in the docker-compose.yml to use
"docker compose" (v2) instead of "docker-compose".
Also removing a workaround for a bug in older versions of compose,
where build-args did not properly inherit their value from the
current environment. Testing this scenario on a current version
of compose shows that that problem has been resolved:
Using this compose-file:
```yaml
services:
docs:
build:
args:
- JEKYLL_ENV
context: .
```
And this Dockerfile:
```dockerfile
ARG JEKYLL_ENV=default
FROM alpine
ARG JEKYLL_ENV
RUN echo $JEKYLL_ENV >> /result.txt
CMD cat /result.txt
```
It looks like this issue has been resolved:
Without setting the `JEKYLL_ENV` environment variable, the Dockerfile correctly uses
the default value from the Dockerfile:
```console
docker compose build
[+] Building 0.6s (6/6) FINISHED
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 31B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/alpine:latest 0.0s
=> CACHED [1/2] FROM docker.io/library/alpine 0.0s
=> [2/2] RUN echo default >> /result.txt 0.3s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:c22cfa2355a910991d1bd4f4d83a0b9d4fad7dc73b1ea83fba05f8949e564591 0.0s
=> => naming to docker.io/library/composeenv_docs 0.0s
docker compose run --rm docs
default
```
And when setting `JEKYLL_ENV`, it's used to override the default in the Dockerfile:
```console
JEKYLL_ENV=production docker compose build
[+] Building 2.6s (6/6) FINISHED
=> [internal] load build definition from Dockerfile 0.5s
=> => transferring dockerfile: 120B 0.0s
=> [internal] load .dockerignore 0.4s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/alpine:latest 0.0s
=> [1/2] FROM docker.io/library/alpine 0.0s
=> [2/2] RUN echo production >> /result.txt 1.6s
=> exporting to image 0.1s
=> => exporting layers 0.1s
=> => writing image sha256:a05ca33d07d411660bd26f817a3d9201f3d7f15d198879cadc70e83e5d1f7fd5 0.0s
=> => naming to docker.io/library/composeenv_docs 0.0s
docker compose run --rm docs
production
```
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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>
The current target didn't have jekyll installed, so mounting the
source-files didn't do anything.
This patch removes the bind-mount.
Alternatively, we could switch back to using a jekyll stage (with
automatic rebuilding).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Also fix regeneration. The starefossen/github-pages image had
--force_polling set to poll the filesystem, but this didn't
seem to work. Docker for Mac/Windows supports filesystem events,
so it now uses this instead.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
server and signer, and set these to be the default configuration
files when running the images.
Compose specifies the configuration with MySQL.
Signed-off-by: Ying Li <ying.li@docker.com>
Add a service name and ephemeral ports to notary server.
Remove certs as TLS is terminated in the ELB.
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>