diff --git a/docker-compose.yml b/docker-compose.yml index 49d014585..98b101cde 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -114,6 +114,13 @@ services: - ./data/dms/mail-logs:/var/log/mail - ./data/dms/config:/tmp/docker-mailserver + registry: + container_name: registry + restart: always + image: registry:2 + volumes: + - ./data/registry:/var/lib/registry + nginx: container_name: nginx image: nginxproxy/nginx-proxy diff --git a/nginx-proxy/etc/nginx/vhost.d/default_location b/nginx-proxy/etc/nginx/vhost.d/default_location index e9b54be9a..a8074cc53 100644 --- a/nginx-proxy/etc/nginx/vhost.d/default_location +++ b/nginx-proxy/etc/nginx/vhost.d/default_location @@ -6,3 +6,17 @@ location /internal/ { proxy_http_version 1.1; proxy_pass $redirect_uri; # Use URI determined by back end } + +location /v2/ { + limit_except GET HEAD { + deny all; + } + + auth_basic off; + proxy_pass http://registry:5000; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 900; +}