Add docker registry container

This commit is contained in:
Jesper Hess 2019-03-02 18:29:15 +01:00
parent 92baab22a9
commit 3b596c5701
Signed by: graffen
GPG key ID: 351A89E40D763F0F
4 changed files with 30 additions and 0 deletions

View file

@ -20,6 +20,7 @@
- privatebin - privatebin
- codimd - codimd
- netdata - netdata
- docker_registry
smtp_host: postfix smtp_host: postfix
smtp_port: 587 smtp_port: 587

View file

@ -35,4 +35,8 @@ codimd:
netdata: netdata:
domain: "netdata.{{ base_domain }}" domain: "netdata.{{ base_domain }}"
docker_registry:
domain: "docker.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/docker-registry"

View file

@ -0,0 +1 @@
client_max_body_size 10G;

View 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"