Browse Source

cleanup

pull/8/head
fedy95 4 years ago
parent
commit
0982ae285f
  1. 48
      .drone.yml
  2. 8
      .editorconfig
  3. 20
      docker-compose.yml
  4. 26
      etc/docker/registry/config.yml

48
.drone.yml

@ -3,16 +3,16 @@ kind: pipeline
type: docker
name: pull_request
image_pull_secrets:
- dockerconfigjson
- dockerconfigjson
steps:
- name: lint yaml
image: registry.fedy95.com/baseimage-yamllint:latest
commands:
- yamllint -c /yamllint/relaxed.yaml etc/docker/registry/config.yml
- yamllint -c /yamllint/relaxed.yaml docker-compose.yml
when:
event: pull_request
- name: lint yaml
image: registry.fedy95.com/baseimage-yamllint:latest
commands:
- yamllint -c /yamllint/relaxed.yaml etc/docker/registry/config.yml
- yamllint -c /yamllint/relaxed.yaml docker-compose.yml
when:
event: pull_request
---
kind: pipeline
@ -20,26 +20,26 @@ type: ssh
name: master_push
clone:
disable: true
disable: true
server:
host:
from_secret: host
user:
from_secret: user
password:
from_secret: password
host:
from_secret: host
user:
from_secret: user
password:
from_secret: password
steps:
- name: release
commands:
- cd /mnt/md0/infra/docker_registry
- git pull
- make restart
- name: release
commands:
- cd /mnt/md0/infra/docker_registry
- git pull
- make restart
trigger:
branch:
- master
event:
- push
branch:
- master
event:
- push
...

8
.editorconfig

@ -1,8 +1,10 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 100

20
docker-compose.yml

@ -2,17 +2,17 @@
version: "3"
services:
registry:
image: registry:2.7.1
container_name: registry
registry:
image: registry:2.7.1
container_name: registry
hostname: registry
restart: always
hostname: registry
restart: always
ports:
- "5000:5000"
ports:
- "5000:5000"
volumes:
- ./etc/docker/registry/config.yml:/etc/docker/registry/config.yml
- ./var/lib/registry:/var/lib/registry
volumes:
- ./etc/docker/registry/config.yml:/etc/docker/registry/config.yml
- ./var/lib/registry:/var/lib/registry
...

26
etc/docker/registry/config.yml

@ -1,20 +1,20 @@
---
version: 0.1
log:
fields:
service: registry
fields:
service: registry
storage:
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
http:
addr: :5000
headers:
X-Content-Type-Options: [nosniff]
addr: :5000
headers:
X-Content-Type-Options: [ nosniff ]
health:
storagedriver:
enabled: true
interval: 10s
threshold: 3
storagedriver:
enabled: true
interval: 10s
threshold: 3
...