Skip to content

Commit bf4b2c7

Browse files
docker-cloud.yml: add Docker stack example
Demonstrate a minimal stack with a generic volume, web host, and proxy. Demonstrates no exposed port on the source server and the need to escape $ values in the HTPASSWD.
1 parent a2cac66 commit bf4b2c7

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

docker-cloud.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: '3.1'
2+
3+
volumes:
4+
web-data:
5+
6+
services:
7+
8+
web:
9+
image: 'nginx'
10+
## instead of an exposed port use FORWARD_PORT below
11+
# ports:
12+
# - '80:80'
13+
volumes:
14+
- web-data:/usr/share/nginx/html:ro
15+
16+
auth:
17+
image: 'beevelop/nginx-basic-auth'
18+
links:
19+
- 'web'
20+
ports:
21+
- '8080:80'
22+
environment:
23+
- PORT=80
24+
- FORWARD_HOST=web
25+
- FORWARD_PORT=80
26+
## escape $ with $$ in Docker yml due to variable expansion
27+
- HTPASSWD=foo:$$apr1$$odHl5EJN$$KbxMfo86Qdve2FH4owePn.

0 commit comments

Comments
 (0)