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

26 lines
517 B
YAML
Raw Normal View History

2022-02-03 09:45:54 +08:00
# This compose file will boot a typical nginx-web topology
2015-08-10 18:51:58 +08:00
# 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"
2022-02-03 09:45:54 +08:00
#nginx to forward request
2015-08-10 18:51:58 +08:00
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