Credits go to https://docs.docker.com/registry/recipes/nginx/ and http://mindtrove.info/control-read-write-access-docker-private-registry/
Follow the steps on https://docs.docker.com/registry/recipes/nginx/ with docker-compose.yml and nginx.conf below.
Run the following for admin UI:
docker run \
-d --restart=unless-stopped --name registry-ui \
-e ENV_DOCKER_REGISTRY_HOST=yourdomain.com \
-e ENV_DOCKER_REGISTRY_PORT=5000 \
-e ENV_DOCKER_REGISTRY_USE_SSL=1 \
-e ENV_USE_SSL=yes \
-e ENV_MODE_BROWSE_ONLY=false \
-v ~/auth/domain.crt:/etc/apache2/server.crt:ro \
-v ~/auth/domain.key:/etc/apache2/server.key:ro \
-p 443:443 \
coolersport/docker-registry-frontend