Skip to content

Instantly share code, notes, and snippets.

@asigatchov
Created January 13, 2018 18:07
Show Gist options
  • Save asigatchov/f54c270eb0790a1947e3e998c15acd43 to your computer and use it in GitHub Desktop.
Save asigatchov/f54c270eb0790a1947e3e998c15acd43 to your computer and use it in GitHub Desktop.
version: '2'
services:
nginx-proxy:
image: jwilder/nginx-proxy
ports:
- "80:80"
- "443:443"
restart: unless-stopped
volumes:
- "/etc/nginx/vhost.d"
- "/usr/share/nginx/html"
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "./nginx/certs:/etc/nginx/certs"
- "./nginx/conf.d/_proxy.conf:/etc/nginx/conf.d/_proxy.conf"
letsencrypt-nginx-proxy-companion:
image: jrcs/letsencrypt-nginx-proxy-companion
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
restart: unless-stopped
volumes_from:
- "nginx-proxy"
registry.fkis.ru:
image: nginx
volumes:
- "./nginx/conf.d/registry.fkis.ru.conf:/etc/nginx/conf.d/registry.fkis.ru.conf"
- nginx_cache:/var/cache/nginx/proxy_temp
restart: unless-stopped
environment:
VIRTUAL_HOST: registry.fkis.ru
SERVICE_NAME: registry.fkis.ru
LETSENCRYPT_HOST: registry.fkis.ru
LETSENCRYPT_EMAIL: admin@fkis.ru
NGINX_DOCKER_GEN_CONTAINER: nginx-gen
depends_on:
- registry-backend
registry-backend:
image: registry:2
restart: unless-stopped
volumes:
- "registry_data:/var/lib/registry"
- "./htpasswd:/auth/htpasswd"
environment:
VIRTUAL_HOST: registry-backend
VIRTUAL_PORT: 5000
SERVICE_NAME: registry-backend
REGISTRY_AUTH: htpasswd
REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
REGISTRY_AUTH_HTPASSWD_REALM: Registry fkis
volumes:
registry_data:
driver: local
nginx_cache:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment