feat: 完成 Harbor 内网访问配置和企业镜像推送
- 修改 hostname 为内网 IP (192.168.1.83) 支持内网访问 - 更新 HTTP 端口为 8080 避免与 OrbStack 冲突 - 添加额外端口 8081 用于 HTTP 重定向 - 更新 admin 密码配置 - 成功推送 50+ 个企业级镜像到 library 项目 - 完善 nginx 配置支持多种访问方式 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
This commit is contained in:
@@ -5,7 +5,7 @@ SYNC_QUOTA=true
|
||||
_REDIS_URL_REG=redis://redis:6379/1?idle_timeout_seconds=30
|
||||
|
||||
LOG_LEVEL=info
|
||||
EXT_ENDPOINT=https://harbor.lan:8443
|
||||
EXT_ENDPOINT=https://192.168.1.83:8443
|
||||
DATABASE_TYPE=postgresql
|
||||
POSTGRESQL_HOST=postgresql
|
||||
POSTGRESQL_PORT=5432
|
||||
@@ -20,10 +20,10 @@ POSTGRESQL_CONN_MAX_IDLE_TIME=0
|
||||
REGISTRY_URL=http://registry:5000
|
||||
PORTAL_URL=http://portal:8080
|
||||
TOKEN_SERVICE_URL=http://core:8080/service/token
|
||||
HARBOR_ADMIN_PASSWORD=Harbor12345
|
||||
HARBOR_ADMIN_PASSWORD=admin
|
||||
MAX_JOB_WORKERS=10
|
||||
CORE_SECRET=1XZMRTagnK5ZtkSW
|
||||
JOBSERVICE_SECRET=QPPNym9jKJ11I8DR
|
||||
CORE_SECRET=evrhBggzCUD4nZrP
|
||||
JOBSERVICE_SECRET=Fz2ZivOojMGv0pN9
|
||||
WITH_TRIVY=False
|
||||
CORE_URL=http://core:8080
|
||||
CORE_LOCAL_URL=http://127.0.0.1:8080
|
||||
@@ -34,14 +34,14 @@ READ_ONLY=false
|
||||
RELOAD_KEY=
|
||||
REGISTRY_CONTROLLER_URL=http://registryctl:8080
|
||||
REGISTRY_CREDENTIAL_USERNAME=harbor_registry_user
|
||||
REGISTRY_CREDENTIAL_PASSWORD=21VN6421wLykzJrWg8EedlHntrx2kd1h
|
||||
CSRF_KEY=k9mPVJQ61w47ZfGcRJD8JAmogOXOIzA4
|
||||
ROBOT_SCANNER_NAME_PREFIX=ZfpDEwzg
|
||||
REGISTRY_CREDENTIAL_PASSWORD=0k8vBxdZcBoL7eYFjJiD96WzKGpIf7XN
|
||||
CSRF_KEY=r7triBX5KUTSc8AQRzt8Zp3AdntdIs8j
|
||||
ROBOT_SCANNER_NAME_PREFIX=8tzoAVCZ
|
||||
PERMITTED_REGISTRY_TYPES_FOR_PROXY_CACHE=docker-hub,harbor,azure-acr,aws-ecr,google-gcr,quay,docker-registry,github-ghcr,jfrog-artifactory
|
||||
|
||||
HTTP_PROXY=
|
||||
HTTPS_PROXY=
|
||||
NO_PROXY=portal,127.0.0.1,db,exporter,registryctl,.local,jobservice,log,redis,registry,.internal,core,postgresql,trivy-adapter,localhost,nginx
|
||||
NO_PROXY=.local,.internal,127.0.0.1,localhost,core,trivy-adapter,portal,registry,registryctl,nginx,jobservice,log,redis,postgresql,db,exporter
|
||||
|
||||
PORT=8080
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CORE_SECRET=1XZMRTagnK5ZtkSW
|
||||
CORE_SECRET=evrhBggzCUD4nZrP
|
||||
REGISTRY_URL=http://registry:5000
|
||||
JOBSERVICE_SECRET=QPPNym9jKJ11I8DR
|
||||
JOBSERVICE_SECRET=Fz2ZivOojMGv0pN9
|
||||
CORE_URL=http://core:8080
|
||||
REGISTRY_CONTROLLER_URL=http://registryctl:8080
|
||||
JOBSERVICE_WEBHOOK_JOB_MAX_RETRY=3
|
||||
@@ -9,9 +9,9 @@ JOBSERVICE_WEBHOOK_JOB_HTTP_CLIENT_TIMEOUT=3
|
||||
|
||||
HTTP_PROXY=
|
||||
HTTPS_PROXY=
|
||||
NO_PROXY=portal,127.0.0.1,db,exporter,registryctl,.local,jobservice,log,redis,registry,.internal,core,postgresql,trivy-adapter,localhost,nginx
|
||||
NO_PROXY=.local,.internal,127.0.0.1,localhost,core,trivy-adapter,portal,registry,registryctl,nginx,jobservice,log,redis,postgresql,db,exporter
|
||||
REGISTRY_CREDENTIAL_USERNAME=harbor_registry_user
|
||||
REGISTRY_CREDENTIAL_PASSWORD=21VN6421wLykzJrWg8EedlHntrx2kd1h
|
||||
REGISTRY_CREDENTIAL_PASSWORD=0k8vBxdZcBoL7eYFjJiD96WzKGpIf7XN
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -146,4 +146,11 @@ http {
|
||||
#server_name harbordomain.com;
|
||||
return 308 https://$host:8443$request_uri;
|
||||
}
|
||||
|
||||
# Additional HTTP server on port 8081 for users who accidentally use HTTP on port 8443
|
||||
server {
|
||||
listen 8081;
|
||||
#server_name harbordomain.com;
|
||||
return 308 https://$host:8443$request_uri;
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
harbor_registry_user:$2y$05$liOQMqe3TrbUcYxAbCpkre6vgRL.bZVshoors/f1nhEWblbbdMIvm
|
||||
harbor_registry_user:$2y$05$qpjbQSEnJNUHPgMZxjzE2.dbLI.bsnkpjSpJdu2J.1S24ZVF585zS
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
CORE_SECRET=1XZMRTagnK5ZtkSW
|
||||
JOBSERVICE_SECRET=QPPNym9jKJ11I8DR
|
||||
CORE_SECRET=evrhBggzCUD4nZrP
|
||||
JOBSERVICE_SECRET=Fz2ZivOojMGv0pN9
|
||||
|
||||
@@ -240,7 +240,8 @@ services:
|
||||
networks:
|
||||
- harbor
|
||||
ports:
|
||||
- 80:8080
|
||||
- 8080:8080
|
||||
- 8081:8081
|
||||
- 8443:8443
|
||||
depends_on:
|
||||
- registry
|
||||
|
||||
+3
-3
@@ -2,12 +2,12 @@
|
||||
|
||||
# The IP address or hostname to access admin UI and registry service.
|
||||
# DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients.
|
||||
hostname: harbor.lan
|
||||
hostname: 192.168.1.83
|
||||
|
||||
# http related config
|
||||
http:
|
||||
# port for http, default is 80. If https enabled, this port will redirect to https port
|
||||
port: 80
|
||||
port: 8080
|
||||
|
||||
# https related config
|
||||
https:
|
||||
@@ -44,7 +44,7 @@ https:
|
||||
# The initial password of Harbor admin
|
||||
# It only works in first time to install harbor
|
||||
# Remember Change the admin password from UI after launching Harbor.
|
||||
harbor_admin_password: Harbor12345
|
||||
harbor_admin_password: admin
|
||||
|
||||
# Harbor DB configuration
|
||||
database:
|
||||
|
||||
Reference in New Issue
Block a user