Skip to content

Instantly share code, notes, and snippets.

@borjaburgos
Created July 23, 2015 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save borjaburgos/22106410394540ca905d to your computer and use it in GitHub Desktop.
Save borjaburgos/22106410394540ca905d to your computer and use it in GitHub Desktop.
A Stackfile for a load-balanced and horizontally scalable Wordpress with volume synchronization using btsync
# The load-balancer, gets deployed anywhere
lb:
image: 'tutum/haproxy:latest'
links:
- wordpress
ports:
- '80:80'
restart: always
roles:
- global
# The MySQL DB, gets deployed to a node tagged as DB
# Change the default "password"
db:
image: 'tutum/mysql:5.5'
environment:
- MYSQL_PASS=password
restart: always
tags:
- db
# The horizontally scaling Wordpress
# Follows the every_node strategy, so that it automatically scales when new
# nodes tagged as "wordpress" are deployed
# Change the default "password"
wordpress:
image: 'tutum/wordpress-stackable:latest'
deployment_strategy: every_node
environment:
- DB_NAME=wordpress
- DB_PASS=password
- DB_USER=admin
links:
- db
restart: always
tags:
- wordpress
volumes:
- /app/wp-content
# The BitTorrent Sync service to keep /wp-content in sync across all WPs
# Also follows the every_node strategy, and it's deployed alongside
# every wordpress container
btsync:
image: 'tutum/btsync:latest'
deployment_strategy: every_node
restart: always
roles:
- global
tags:
- wordpress
volumes_from:
- wordpress
@lvnilesh
Copy link

lvnilesh commented Aug 5, 2015

does not seem to pass YML lint

@lvnilesh
Copy link

lvnilesh commented Aug 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment