Skip to content

Commit dff0c97

Browse files
Merge branch 'jeremydouglass-patch-1'
* jeremydouglass-patch-1: rename docker-cloud.yml --> docker-stack.yml comments: give simple example instructions for compose and swarm comments: expand port and pass comments drop `links` (ignored in swarm)
2 parents 039c8a2 + e56128f commit dff0c97

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,35 @@
11
version: '3.1'
22

3+
# run with docker-compose:
4+
#
5+
# docker-compose -f docker-stack.yml up
6+
7+
# run with docker swarm:
8+
#
9+
# docker swarm init
10+
# docker stack deploy --compose-file docker-stack.yml authdemo
11+
312
volumes:
413
web-data:
514

615
services:
716

817
web:
918
image: 'nginx'
10-
## instead of an exposed port use FORWARD_PORT below
19+
## instead of an exposed port, use FORWARD_PORT in auth, below
1120
# ports:
1221
# - '80:80'
1322
volumes:
1423
- web-data:/usr/share/nginx/html:ro
1524

1625
auth:
1726
image: 'beevelop/nginx-basic-auth'
18-
links:
19-
- 'web'
2027
ports:
2128
- '8080:80'
2229
environment:
2330
- PORT=80
2431
- FORWARD_HOST=web
2532
- FORWARD_PORT=80
2633
## escape $ with $$ in Docker yml due to variable expansion
34+
## example user/pass generated with htpasswd is foo:bar
2735
- HTPASSWD=foo:$$apr1$$odHl5EJN$$KbxMfo86Qdve2FH4owePn.

0 commit comments

Comments
 (0)