26 lines
517 B
YAML
26 lines
517 B
YAML
|
# This compose file will boot a typical nginx-web topology
|
||
|
# 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:
|
||
|
image: yeasy/nginx
|
||
|
hostname: nginx
|
||
|
links:
|
||
|
- web:web
|
||
|
ports:
|
||
|
- "80:80"
|
||
|
environment:
|
||
|
- BACKEND=web
|
||
|
- PORT=80
|
||
|
- USERNAME=user
|
||
|
- PASSWORD=pass
|