mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 05:19:39 +02:00
Added docker-compose config for nginx-basic-auth.
This commit is contained in:
parent
c3f22fe989
commit
5947e262fc
5 changed files with 36 additions and 4 deletions
|
@ -1,4 +1,2 @@
|
|||
node_modules
|
||||
bower_components
|
||||
.git
|
||||
Dockerfile
|
||||
*
|
||||
!dist
|
||||
|
|
4
examples/nginx-basic-auth/Dockerfile
Normal file
4
examples/nginx-basic-auth/Dockerfile
Normal 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
|
17
examples/nginx-basic-auth/default.conf
Normal file
17
examples/nginx-basic-auth/default.conf
Normal 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;
|
||||
}
|
||||
}
|
12
examples/nginx-basic-auth/docker-compose.yml
Normal file
12
examples/nginx-basic-auth/docker-compose.yml
Normal 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
|
1
examples/nginx-basic-auth/users.htpasswd
Normal file
1
examples/nginx-basic-auth/users.htpasswd
Normal file
|
@ -0,0 +1 @@
|
|||
user:{PLAIN}password
|
Loading…
Add table
Add a link
Reference in a new issue