init
This commit is contained in:
commit
883f31932e
169 changed files with 5676 additions and 0 deletions
28
ansible/roles/docker_registry/templates/vhost.conf.j2
Normal file
28
ansible/roles/docker_registry/templates/vhost.conf.j2
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName {{ hostname }}
|
||||
Redirect permanent / https://{{ hostname }}/
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:443>
|
||||
ServerName {{ hostname }}
|
||||
SSLEngine on
|
||||
SSLCertificateFile {{ ssl_cert }}
|
||||
SSLCertificateKeyFile {{ ssl_key }}
|
||||
|
||||
# Return an empty OCI index for referrers requests.
|
||||
# registry:2 does not support the OCI referrers API and proxies
|
||||
# the request to upstream which may return HTML error pages,
|
||||
# causing Docker 29+ to fail with "failed to decode referrers index".
|
||||
RewriteEngine on
|
||||
RewriteRule "^/v2/.*/referrers/" - [R=200,L,E=REFERRERS:1]
|
||||
Header always set Content-Type "application/vnd.oci.image.index.v1+json" env=REFERRERS
|
||||
<LocationMatch "^/v2/.*/referrers/">
|
||||
ErrorDocument 200 '{"schemaVersion":2,"mediaType":"application/vnd.oci.image.index.v1+json","manifests":[]}'
|
||||
</LocationMatch>
|
||||
|
||||
ProxyPreserveHost on
|
||||
RequestHeader set X-Forwarded-Proto "https"
|
||||
RequestHeader set X-Forwarded-Ssl "on"
|
||||
ProxyPass / http://127.0.0.1:{{ port }}/
|
||||
ProxyPassReverse / http://127.0.0.1:{{ port }}/
|
||||
</VirtualHost>
|
||||
Loading…
Add table
Add a link
Reference in a new issue