Skip to content

Commit e42a907

Browse files
committed
Add sample docker-compose.yml
[skip build]
1 parent 1e3ce7a commit e42a907

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ $ docker run \
2626

2727
Access to http://localhost:8080 , then browser asks you username and password.
2828

29+
You can also try complete HTTP-proxy example using Docker Compose.
30+
hello-world web application cannot be accessed without authentication.
31+
32+
```bash
33+
$ docker-compose up
34+
# http://localhost:8080/
35+
# - Username: username
36+
# - Password: password
37+
```
38+
2939
## Environment variables
3040

3141
### Required

docker-compose.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: '2'
2+
services:
3+
web:
4+
image: tutum/hello-world:latest
5+
nginx:
6+
image: quay.io/dtan4/nginx-basic-auth-proxy:latest
7+
ports:
8+
- 8080:80
9+
environment:
10+
- BASIC_AUTH_USERNAME=username
11+
- BASIC_AUTH_PASSWORD=password
12+
- PROXY_PASS=http://web/

0 commit comments

Comments
 (0)