registry: Add redis as cache

This commit is contained in:
Kacper Donat 2021-06-04 09:56:09 +02:00
parent 7d14d9b6e7
commit 586e1653b7
2 changed files with 17 additions and 7 deletions

View File

@ -1,21 +1,24 @@
version: 0.1 version: 0.1
log: log:
level: debug
fields: fields:
service: registry service: registry
storage: storage:
cache: cache:
blobdescriptor: inmemory blobdescriptor: redis
{{ registry_storage|to_nice_yaml(indent=2, width=140)|indent(2) }} {{ registry_storage|to_nice_yaml(indent=2, width=140)|indent(2) }}
redis:
addr: redis:6379
http: http:
addr: :5000 addr: :5000
headers: headers:
X-Content-Type-Options: [nosniff] X-Content-Type-Options: [nosniff]
auth: auth:
htpasswd: htpasswd:
realm: basic-realm realm: Kadet's private registry
path: /etc/docker/registry/htpasswd path: /etc/docker/registry/htpasswd
health:
storagedriver:
enabled: true
interval: 10s
threshold: 3

View File

@ -1,6 +1,13 @@
version: "{{ compose_version }}" version: "{{ compose_version }}"
services: services:
redis:
image: redis:latest
deploy:
resources:
limits:
memory: 256M
registry: registry:
image: registry:2 image: registry:2
secrets: secrets: