Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker registry #153

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions nginx-proxy/etc/nginx/vhost.d/default_location
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}