feat: update Guidelines
This commit is contained in:
@@ -1,29 +1,27 @@
|
||||
x-default: &default
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- &localtime /etc/localtime:/etc/localtime:ro
|
||||
- &timezone /etc/timezone:/etc/timezone:ro
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: 100m
|
||||
max-file: "3"
|
||||
|
||||
services:
|
||||
# Harbor Core
|
||||
harbor-core:
|
||||
<<: *default
|
||||
image: goharbor/harbor-core:${HARBOR_VERSION:-v2.12.0}
|
||||
container_name: harbor-core
|
||||
depends_on:
|
||||
- harbor-db
|
||||
- harbor-redis
|
||||
harbor-db:
|
||||
condition: service_healthy
|
||||
harbor-redis:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- *localtime
|
||||
- *timezone
|
||||
- harbor_config:/etc/core
|
||||
- harbor_ca_download:/etc/core/ca
|
||||
- harbor_secret:/etc/core/certificates
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
- CORE_SECRET=${HARBOR_CORE_SECRET:-}
|
||||
- JOBSERVICE_SECRET=${HARBOR_JOBSERVICE_SECRET:-}
|
||||
- DATABASE_TYPE=postgresql
|
||||
@@ -32,7 +30,7 @@ services:
|
||||
- POSTGRESQL_USERNAME=postgres
|
||||
- POSTGRESQL_PASSWORD=${HARBOR_DB_PASSWORD:-password}
|
||||
- POSTGRESQL_DATABASE=registry
|
||||
- REGISTRY_URL=http://registry:5000
|
||||
- REGISTRY_URL=http://harbor-registry:5000
|
||||
- TOKEN_SERVICE_URL=http://harbor-core:8080/service/token
|
||||
- HARBOR_ADMIN_PASSWORD=${HARBOR_ADMIN_PASSWORD:-Harbor12345}
|
||||
- CORE_URL=http://harbor-core:8080
|
||||
@@ -40,20 +38,26 @@ services:
|
||||
- REGISTRY_STORAGE_PROVIDER_NAME=filesystem
|
||||
- READ_ONLY=false
|
||||
- RELOAD_KEY=${HARBOR_RELOAD_KEY:-}
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/api/v2.0/ping"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
|
||||
# Harbor JobService
|
||||
harbor-jobservice:
|
||||
<<: *default
|
||||
image: goharbor/harbor-jobservice:${HARBOR_VERSION:-v2.12.0}
|
||||
container_name: harbor-jobservice
|
||||
depends_on:
|
||||
- harbor-db
|
||||
- harbor-redis
|
||||
harbor-db:
|
||||
condition: service_healthy
|
||||
harbor-redis:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- *localtime
|
||||
- *timezone
|
||||
- harbor_job_logs:/var/log/jobs
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
- CORE_SECRET=${HARBOR_CORE_SECRET:-}
|
||||
- JOBSERVICE_SECRET=${HARBOR_JOBSERVICE_SECRET:-}
|
||||
- CORE_URL=http://harbor-core:8080
|
||||
@@ -68,49 +72,56 @@ services:
|
||||
harbor-registry:
|
||||
<<: *default
|
||||
image: goharbor/registry-photon:${HARBOR_VERSION:-v2.12.0}
|
||||
container_name: harbor-registry
|
||||
volumes:
|
||||
- *localtime
|
||||
- *timezone
|
||||
- harbor_registry:/storage
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
- REGISTRY_HTTP_SECRET=${HARBOR_REGISTRY_SECRET:-}
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5000/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
# Harbor Portal (UI)
|
||||
harbor-portal:
|
||||
<<: *default
|
||||
image: goharbor/harbor-portal:${HARBOR_VERSION:-v2.12.0}
|
||||
container_name: harbor-portal
|
||||
volumes:
|
||||
- *localtime
|
||||
- *timezone
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
|
||||
# Harbor Proxy (Nginx)
|
||||
harbor-proxy:
|
||||
<<: *default
|
||||
image: goharbor/nginx-photon:${HARBOR_VERSION:-v2.12.0}
|
||||
container_name: harbor-proxy
|
||||
ports:
|
||||
- "${HARBOR_HTTP_PORT_OVERRIDE:-80}:8080"
|
||||
- "${HARBOR_HTTPS_PORT_OVERRIDE:-443}:8443"
|
||||
depends_on:
|
||||
- harbor-core
|
||||
- harbor-portal
|
||||
- harbor-registry
|
||||
volumes:
|
||||
- *localtime
|
||||
- *timezone
|
||||
harbor-core:
|
||||
condition: service_healthy
|
||||
harbor-portal:
|
||||
condition: service_started
|
||||
harbor-registry:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
# Harbor Database
|
||||
harbor-db:
|
||||
<<: *default
|
||||
image: goharbor/harbor-db:${HARBOR_VERSION:-v2.12.0}
|
||||
container_name: harbor-db
|
||||
volumes:
|
||||
- *localtime
|
||||
- *timezone
|
||||
- harbor_db:/var/lib/postgresql/data
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
- POSTGRES_PASSWORD=${HARBOR_DB_PASSWORD:-password}
|
||||
- POSTGRES_DB=registry
|
||||
deploy:
|
||||
@@ -121,16 +132,21 @@ services:
|
||||
reservations:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
|
||||
# Harbor Redis
|
||||
harbor-redis:
|
||||
<<: *default
|
||||
image: goharbor/redis-photon:${HARBOR_VERSION:-v2.12.0}
|
||||
container_name: harbor-redis
|
||||
volumes:
|
||||
- *localtime
|
||||
- *timezone
|
||||
- harbor_redis:/var/lib/redis
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
@@ -139,6 +155,12 @@ services:
|
||||
reservations:
|
||||
cpus: '0.10'
|
||||
memory: 64M
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
|
||||
volumes:
|
||||
harbor_config:
|
||||
|
||||
Reference in New Issue
Block a user