
Use YAML anchors for repeated values providing a single source of truth. I would use `x-*` convention to store anchors above service containers, but this seems to require a compose config that defines the services (and version?) keys, which this test setup was failing to be compatible with for some reason..
46 lines
No EOL
1 KiB
YAML
46 lines
No EOL
1 KiB
YAML
web5:
|
|
image: web
|
|
expose:
|
|
- "85"
|
|
environment:
|
|
WEB_PORTS: "85"
|
|
VIRTUAL_HOST: "web5.nginx-proxy.tld"
|
|
|
|
# sut - System Under Test
|
|
# `docker.sock` required for functionality
|
|
# `certs` required to enable HTTPS via template
|
|
with_default_group:
|
|
container_name: dh-default
|
|
image: &img-nginxproxy nginxproxy/nginx-proxy:test
|
|
volumes: &vols-common
|
|
- &docker-sock /var/run/docker.sock:/tmp/docker.sock:ro
|
|
- &nginx-certs ./certs:/etc/nginx/certs:ro
|
|
|
|
with_alternative_group:
|
|
container_name: dh-env
|
|
environment:
|
|
- DHPARAM_BITS=2048
|
|
image: *img-nginxproxy
|
|
volumes: *vols-common
|
|
|
|
with_invalid_group:
|
|
container_name: invalid-group-1024
|
|
environment:
|
|
- DHPARAM_BITS=1024
|
|
image: *img-nginxproxy
|
|
volumes: *vols-common
|
|
|
|
with_custom_file:
|
|
container_name: dh-file
|
|
image: *img-nginxproxy
|
|
volumes:
|
|
- *docker-sock
|
|
- *nginx-certs
|
|
- ../lib/ssl/dhparam.pem:/etc/nginx/dhparam/dhparam.pem:ro
|
|
|
|
with_skip:
|
|
container_name: dh-skip
|
|
environment:
|
|
- DHPARAM_SKIP=1
|
|
image: *img-nginxproxy
|
|
volumes: *vols-common |