Files
deploy.stack/harbor/compose.yaml
T

197 lines
4.6 KiB
YAML
Raw Normal View History

2024-08-02 10:20:12 +08:00
services:
registry:
2026-11-04 12:02:57 +08:00
image: goharbor/registry-photon:v2.15.4
2024-08-02 10:20:12 +08:00
container_name: registry
restart: always
cap_drop:
- ALL
cap_add:
- CHOWN
- SETGID
- SETUID
volumes:
- /data/harbor/registry:/storage:z
- /data/harbor/common/config/registry/:/etc/registry/:z
- /data/harbor/secret/registry/root.crt:/etc/registry/root.crt
- /data/harbor/common/config/shared/trust-certificates:/harbor_cust_cert
2024-08-02 10:20:12 +08:00
networks:
- harbor
logging:
2026-11-04 12:02:57 +08:00
driver: json-file
2024-08-02 10:20:12 +08:00
options:
2026-11-04 12:02:57 +08:00
max-size: "10m"
max-file: "3"
2024-08-02 10:20:12 +08:00
registryctl:
2026-11-04 12:02:57 +08:00
image: goharbor/harbor-registryctl:v2.15.4
2024-08-02 10:20:12 +08:00
container_name: registryctl
env_file:
- /data/harbor/common/config/registryctl/env
2024-08-02 10:20:12 +08:00
restart: always
cap_drop:
- ALL
cap_add:
- CHOWN
- SETGID
- SETUID
volumes:
- /data/harbor/registry:/storage:z
- /data/harbor/common/config/registry/:/etc/registry/:z
- /data/harbor/common/config/registryctl/config.yml:/etc/registryctl/config.yml
- /data/harbor/common/config/shared/trust-certificates:/harbor_cust_cert
2024-08-02 10:20:12 +08:00
networks:
- harbor
logging:
2026-11-04 12:02:57 +08:00
driver: json-file
2024-08-02 10:20:12 +08:00
options:
2026-11-04 12:02:57 +08:00
max-size: "10m"
max-file: "3"
2024-08-02 10:20:12 +08:00
postgresql:
2026-11-04 12:02:57 +08:00
image: goharbor/harbor-db:v2.15.4
2024-08-02 10:20:12 +08:00
container_name: harbor-db
restart: always
cap_drop:
- ALL
cap_add:
- CHOWN
- DAC_OVERRIDE
- SETGID
- SETUID
volumes:
- /data/harbor/database:/var/lib/postgresql/data:z
2024-08-02 10:20:12 +08:00
networks:
harbor:
env_file:
- /data/harbor/common/config/db/env
2024-08-02 10:20:12 +08:00
logging:
2026-11-04 12:02:57 +08:00
driver: json-file
2024-08-02 10:20:12 +08:00
options:
2026-11-04 12:02:57 +08:00
max-size: "10m"
max-file: "3"
shm_size: '1gb'
2024-08-02 10:20:12 +08:00
core:
2026-11-04 12:02:57 +08:00
image: goharbor/harbor-core:v2.15.4
2024-08-02 10:20:12 +08:00
container_name: harbor-core
env_file:
- /data/harbor/common/config/core/env
2024-08-02 10:20:12 +08:00
restart: always
cap_drop:
- ALL
cap_add:
- SETGID
- SETUID
volumes:
- /data/harbor/ca_download/:/etc/core/ca/:z
- /data/harbor/:/data/:z
- /data/harbor/common/config/core/certificates/:/etc/core/certificates/:z
- /data/harbor/common/config/core/app.conf:/etc/core/app.conf
- /data/harbor/secret/core/private_key.pem:/etc/core/private_key.pem
- /data/harbor/data/harbor/secret/keys/secretkey:/etc/core/key
- /data/harbor/common/config/shared/trust-certificates:/harbor_cust_cert
2024-08-02 10:20:12 +08:00
networks:
harbor:
depends_on:
- registry
- redis
- postgresql
logging:
2026-11-04 12:02:57 +08:00
driver: json-file
2024-08-02 10:20:12 +08:00
options:
2026-11-04 12:02:57 +08:00
max-size: "10m"
max-file: "3"
2024-08-02 10:20:12 +08:00
portal:
2026-11-04 12:02:57 +08:00
image: goharbor/harbor-portal:v2.15.4
2024-08-02 10:20:12 +08:00
container_name: harbor-portal
restart: always
cap_drop:
- ALL
cap_add:
- CHOWN
- SETGID
- SETUID
- NET_BIND_SERVICE
volumes:
- /data/harbor/common/config/portal/nginx.conf:/etc/nginx/nginx.conf
2024-08-02 10:20:12 +08:00
networks:
- harbor
logging:
2026-11-04 12:02:57 +08:00
driver: json-file
2024-08-02 10:20:12 +08:00
options:
2026-11-04 12:02:57 +08:00
max-size: "10m"
max-file: "3"
2024-08-02 10:20:12 +08:00
jobservice:
2026-11-04 12:02:57 +08:00
image: goharbor/harbor-jobservice:v2.15.4
2024-08-02 10:20:12 +08:00
container_name: harbor-jobservice
env_file:
- /data/harbor/common/config/jobservice/env
2024-08-02 10:20:12 +08:00
restart: always
cap_drop:
- ALL
cap_add:
- CHOWN
- SETGID
- SETUID
volumes:
- /data/harbor/job_logs:/var/log/jobs:z
- /data/harbor/common/config/jobservice/config.yml:/etc/jobservice/config.yml
- /data/harbor/common/config/shared/trust-certificates:/harbor_cust_cert
2024-08-02 10:20:12 +08:00
networks:
- harbor
depends_on:
- core
logging:
2026-11-04 12:02:57 +08:00
driver: json-file
2024-08-02 10:20:12 +08:00
options:
2026-11-04 12:02:57 +08:00
max-size: "10m"
max-file: "3"
2024-08-02 10:20:12 +08:00
redis:
2026-11-04 12:02:57 +08:00
image: goharbor/valkey-photon:v2.15.4
2024-08-02 10:20:12 +08:00
container_name: redis
restart: always
cap_drop:
- ALL
cap_add:
- CHOWN
- SETGID
- SETUID
volumes:
- /data/harbor/redis:/var/lib/redis
2024-08-02 10:20:12 +08:00
networks:
harbor:
logging:
2026-11-04 12:02:57 +08:00
driver: json-file
2024-08-02 10:20:12 +08:00
options:
2026-11-04 12:02:57 +08:00
max-size: "10m"
max-file: "3"
2024-08-02 10:20:12 +08:00
proxy:
2026-11-04 12:02:57 +08:00
image: goharbor/nginx-photon:v2.15.4
2024-08-02 10:20:12 +08:00
container_name: nginx
restart: always
cap_drop:
- ALL
cap_add:
- CHOWN
- SETGID
- SETUID
- NET_BIND_SERVICE
volumes:
- /data/harbor/common/config/nginx:/etc/nginx:z
- /data/harbor/common/config/shared/trust-certificates:/harbor_cust_cert
2024-08-02 10:20:12 +08:00
networks:
- harbor
ports:
- 8080:8080
- 8443:8443
2024-08-02 10:20:12 +08:00
depends_on:
- registry
- core
- portal
logging:
2026-11-04 12:02:57 +08:00
driver: json-file
2024-08-02 10:20:12 +08:00
options:
2026-11-04 12:02:57 +08:00
max-size: "10m"
max-file: "3"
2024-08-02 10:20:12 +08:00
networks:
harbor:
2026-11-04 12:02:57 +08:00
external: false