Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

lvnilesh commented Aug 5, 2015

does not seem to pass YML lint

@lvnilesh

This comment has been minimized.

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
You can’t perform that action at this time.