Skip to content

Commit 5947e26

Browse files
committed
Added docker-compose config for nginx-basic-auth.
1 parent c3f22fe commit 5947e26

File tree

5 files changed

+36
-4
lines changed

5 files changed

+36
-4
lines changed

.dockerignore

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
node_modules
2-
bower_components
3-
.git
4-
Dockerfile
1+
*
2+
!dist

examples/nginx-basic-auth/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM nginx:1.9.9
2+
3+
COPY default.conf /etc/nginx/conf.d/default.conf
4+
COPY users.htpasswd /etc/nginx/users.htpasswd
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
upstream dockerui {
2+
server dockerui:9000;
3+
}
4+
5+
server {
6+
listen 80;
7+
server_name localhost;
8+
9+
location / {
10+
auth_basic "Docker UI";
11+
auth_basic_user_file /etc/nginx/users.htpasswd;
12+
13+
proxy_http_version 1.1;
14+
proxy_set_header Connection "";
15+
proxy_pass http://dockerui;
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
dockerui:
2+
image: dockerui/dockerui
3+
privileged: true
4+
volumes:
5+
- /var/run/docker.sock:/var/run/docker.sock
6+
7+
nginx:
8+
build: .
9+
links:
10+
- dockerui
11+
ports:
12+
- 80:80
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
user:{PLAIN}password

0 commit comments

Comments
 (0)