forked from data.coop/ansible
Add docker registry container
This commit is contained in:
parent
92baab22a9
commit
3b596c5701
|
@ -20,6 +20,7 @@
|
||||||
- privatebin
|
- privatebin
|
||||||
- codimd
|
- codimd
|
||||||
- netdata
|
- netdata
|
||||||
|
- docker_registry
|
||||||
|
|
||||||
smtp_host: postfix
|
smtp_host: postfix
|
||||||
smtp_port: 587
|
smtp_port: 587
|
||||||
|
|
|
@ -36,3 +36,7 @@ codimd:
|
||||||
netdata:
|
netdata:
|
||||||
domain: "netdata.{{ base_domain }}"
|
domain: "netdata.{{ base_domain }}"
|
||||||
|
|
||||||
|
docker_registry:
|
||||||
|
domain: "docker.{{ base_domain }}"
|
||||||
|
volume_folder: "{{ volume_root_folder }}/docker-registry"
|
||||||
|
|
1
roles/docker/files/configs/docker_registry/nginx.conf
Normal file
1
roles/docker/files/configs/docker_registry/nginx.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
client_max_body_size 10G;
|
24
roles/docker/tasks/services/docker_registry.yml
Normal file
24
roles/docker/tasks/services/docker_registry.yml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
- name: copy docker registry nginx configuration
|
||||||
|
copy:
|
||||||
|
src: "files/configs/docker_registry/nginx.conf"
|
||||||
|
dest: "/docker-volumes/nginx/vhost/{{ docker_registry.domain }}"
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
|
- name: docker registry container
|
||||||
|
docker_container:
|
||||||
|
name: registry
|
||||||
|
image: registry:2
|
||||||
|
restart_policy: always
|
||||||
|
volumes:
|
||||||
|
- "{{ docker_registry.volume_folder }}/registry:/var/lib/registry"
|
||||||
|
- "{{ docker_registry.volume_folder }}/auth:/auth"
|
||||||
|
networks:
|
||||||
|
- name: external_services
|
||||||
|
env:
|
||||||
|
VIRTUAL_HOST: "{{ docker_registry.domain }}"
|
||||||
|
LETSENCRYPT_HOST: "{{ docker_registry.domain }}"
|
||||||
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
||||||
|
REGISTRY_AUTH: "htpasswd"
|
||||||
|
REGISTRY_AUTH_HTPASSWD_PATH: "/auth/htpasswd"
|
||||||
|
REGISTRY_AUTH_HTPASSWD_REALM: "data.coop docker registry"
|
Loading…
Reference in a new issue