1
0
Fork 0
mirror of https://github.com/nginx-proxy/nginx-proxy synced 2024-05-06 15:46:09 +02:00

chore: DRY up `test_dhparam.yml`

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..
This commit is contained in:
polarathene 2021-09-29 15:19:38 +13:00
parent 391ca3e3b5
commit 41bd4076c0

View File

@ -7,44 +7,40 @@ web5:
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:
image: nginxproxy/nginx-proxy:test
container_name: dh-default
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs:ro
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:
image: nginxproxy/nginx-proxy:test
container_name: dh-env
environment:
- DHPARAM_BITS=2048
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs:ro
image: *img-nginxproxy
volumes: *vols-common
with_invalid_group:
image: nginxproxy/nginx-proxy:test
container_name: invalid-group-1024
environment:
- DHPARAM_BITS=1024
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs:ro
image: *img-nginxproxy
volumes: *vols-common
with_custom_file:
image: nginxproxy/nginx-proxy:test
container_name: dh-file
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs:ro
image: *img-nginxproxy
volumes:
- *docker-sock
- *nginx-certs
- ../lib/ssl/dhparam.pem:/etc/nginx/dhparam/dhparam.pem:ro
with_skip:
image: nginxproxy/nginx-proxy:test
container_name: dh-skip
environment:
- DHPARAM_SKIP=1
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs:ro
image: *img-nginxproxy
volumes: *vols-common