feat: add docker-registry/ & milvus-standalone/
This commit is contained in:
14
src/docker-registry/README.zh.md
Normal file
14
src/docker-registry/README.zh.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Docker 镜像仓库
|
||||
|
||||
请参考教程 [搭建私有 Docker 镜像仓库](https://docs.alexsun.top/public/ops/docker/docker-registry/)。
|
||||
|
||||
需要先 [给服务器生成一张证书](https://docs.alexsun.top/public/blog/2024-06/certs-maker.html),然后将证书放到服务器上的 `certs/` 文件夹下面,请使用 PEM 格式的证书。
|
||||
|
||||
配置 `.env` 文件:
|
||||
|
||||
```bash
|
||||
REGISTRY_HTTP_TLS_CERTIFICATE=xxxxxx.crt
|
||||
REGISTRY_HTTP_TLS_KEY=xxxxxx.key
|
||||
```
|
||||
|
||||
使用 `OTEL_TRACES_EXPORTER=none` 停用观测。
|
||||
27
src/docker-registry/config.yml
Normal file
27
src/docker-registry/config.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
version: 0.1
|
||||
log:
|
||||
level: debug
|
||||
fields:
|
||||
service: registry
|
||||
environment: development
|
||||
storage:
|
||||
delete:
|
||||
enabled: false # Change to true to enable deletion of images
|
||||
cache:
|
||||
blobdescriptor: inmemory
|
||||
filesystem:
|
||||
rootdirectory: /var/lib/registry
|
||||
tag:
|
||||
concurrencylimit: 5
|
||||
http:
|
||||
addr: :5000
|
||||
debug:
|
||||
addr: :5001
|
||||
prometheus:
|
||||
enabled: true
|
||||
path: /metrics
|
||||
health:
|
||||
storagedriver:
|
||||
enabled: true
|
||||
interval: 10s
|
||||
threshold: 3
|
||||
40
src/docker-registry/docker-compose.yaml
Normal file
40
src/docker-registry/docker-compose.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
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
|
||||
|
||||
services:
|
||||
registry:
|
||||
<<: *default
|
||||
image: registry:${REGISTRY_VERSION:-3.0.0}
|
||||
volumes:
|
||||
- *localtime
|
||||
- *timezone
|
||||
- ./certs:/certs:ro
|
||||
- ./config.yml:/etc/distribution/config.yml:ro
|
||||
- registry:/var/lib/registry
|
||||
environment:
|
||||
REGISTRY_AUTH: ${REGISTRY_AUTH:-htpasswd}
|
||||
REGISTRY_AUTH_HTPASSWD_REALM: ${REGISTRY_AUTH_HTPASSWD_REALM:-Registry Realm}
|
||||
REGISTRY_AUTH_HTPASSWD_PATH: ${REGISTRY_AUTH_HTPASSWD_PATH:-/certs/passwd}
|
||||
REGISTRY_HTTP_TLS_CERTIFICATE: ${REGISTRY_HTTP_TLS_CERTIFICATE}
|
||||
REGISTRY_HTTP_TLS_KEY: ${REGISTRY_HTTP_TLS_KEY}
|
||||
OTEL_TRACES_EXPORTER: ${OTEL_TRACES_EXPORTER:-none}
|
||||
ports:
|
||||
- ${REGISTRY_PORT:-5000}:5000
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 1G
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
|
||||
volumes:
|
||||
registry:
|
||||
Reference in New Issue
Block a user