Skip to content

Commit

Permalink
Add the Stack file for the demo
Browse files Browse the repository at this point in the history
[refs #a456f8d3f09f]
  • Loading branch information
jfahrer committed May 5, 2018
1 parent 64bf47f commit cc80075
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion swarm/swarm-demo/app.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
POSTGRES_USER=demo
POSTGRES_PASSWORD=secret
POSTGRES_DB=demo
POSTGRES_HOST=demo-db
POSTGRES_HOST=db
35 changes: 35 additions & 0 deletions swarm/swarm-demo/docker-stack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: "3.3"

services:
frontend:
image: jfahrer/swarm-demo-frontend:v5
env_file:
- app.env
deploy:
replicas: 10

db:
image: jfahrer/swarm-demo-db:v1
env_file:
- db.env
volumes:
- pg-data:/var/lib/postgresql/data
deploy:
resources:
reservations:
memory: 256M
placement:
constraints:
- node.hostname == node1

lb:
image: jfahrer/swarm-demo-lb:v1
environment:
- PROXY_UPSTREAM=frontend:8080
ports:
- 80:80
deploy:
replicas: 3

volumes:
pg-data:

0 comments on commit cc80075

Please sign in to comment.