Added docker-compose config for nginx-basic-auth.

pull/2/head
Kevan Ahlquist 2015-12-17 01:31:07 -06:00
parent c3f22fe989
commit 5947e262fc
5 changed files with 36 additions and 4 deletions

View File

@ -1,4 +1,2 @@
node_modules
bower_components
.git
Dockerfile
*
!dist

View File

@ -0,0 +1,4 @@
FROM nginx:1.9.9
COPY default.conf /etc/nginx/conf.d/default.conf
COPY users.htpasswd /etc/nginx/users.htpasswd

View File

@ -0,0 +1,17 @@
upstream dockerui {
server dockerui:9000;
}
server {
listen 80;
server_name localhost;
location / {
auth_basic "Docker UI";
auth_basic_user_file /etc/nginx/users.htpasswd;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass http://dockerui;
}
}

View File

@ -0,0 +1,12 @@
dockerui:
image: dockerui/dockerui
privileged: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
nginx:
build: .
links:
- dockerui
ports:
- 80:80

View File

@ -0,0 +1 @@
user:{PLAIN}password