docker-compose-files/nginx_auth/docker-compose.yml

26 lines
517 B
YAML
Raw Normal View History

2015-08-10 18:51:58 +08:00
# This compose file will boot a typical nginx-web toplogy
# nginx: can set user/password to access, and forward request to web.
# web: listen on private network
# https://github.com/yeasy/docker-compose-files
#backend web application
web:
image: yeasy/simple-web:latest
hostname: web
expose:
- "80"
#nginx to forward request
nginx:
2015-08-12 14:14:39 +08:00
image: yeasy/nginx
2015-08-10 18:51:58 +08:00
hostname: nginx
links:
- web:web
ports:
- "80:80"
environment:
- BACKEND=web
- PORT=80
- USERNAME=user
- PASSWORD=pass