Skip to content

Commit

Permalink
Merge pull request #43 from heyawhite/update-memory-package
Browse files Browse the repository at this point in the history
Update memory package
  • Loading branch information
misterbisson authored Mar 10, 2017
2 parents 2a053dd + cc7609c commit ea60ea6
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
wordpress:
image: autopilotpattern/wordpress:latest
restart: always
mem_limit: 1g
env_file: _env
environment:
- CONSUL_AGENT=1
Expand All @@ -14,6 +13,8 @@ wordpress:
- triton.cns.services=wordpress
# Soft anti-affinity to avoid other WordPress instances
- com.docker.swarm.affinities=["container!=~*wordpress*"]
# Set the package
- com.joyent.package=g4-highcpu-1G

# Consul is the service catalog that helps discovery between the components
# Change "-bootstrap" to "-bootstrap-expect 3", then scale to 3 or more to
Expand All @@ -27,21 +28,21 @@ consul:
-config-dir=/etc/consul
-ui-dir /ui
restart: always
mem_limit: 128m
env_file: _env
ports:
- 8500
dns:
- 127.0.0.1
labels:
- triton.cns.services=consul
# Soft anti-affinity to avoid all other containers
- com.docker.swarm.affinities=["container!=~*"]
- com.joyent.package=g4-highcpu-128M

# NFS is used to store user uploads
nfs:
image: autopilotpattern/nfsserver:latest
restart: always
mem_limit: 256m
env_file: _env
environment:
- CONSUL_AGENT=1
Expand All @@ -51,15 +52,14 @@ nfs:
- 2049
labels:
- triton.cns.services=nfs
# Soft anti-affinity to avoid all other containers
- com.docker.swarm.affinities=["container!=~*"]
- com.joyent.package=g4-highcpu-256M

# The MySQL database will automatically cluster and scale
# see https://www.joyent.com/blog/dbaas-simplicity-no-lock-in
mysql:
image: autopilotpattern/mysql:latest
restart: always
mem_limit: 4g
env_file: _env
environment:
- CONSUL_AGENT=1
Expand All @@ -68,12 +68,12 @@ mysql:
labels:
- triton.cns.services=mysql
- com.docker.swarm.affinities=["container!=~*mysql*"]
- com.joyent.package=g4-highcpu-4G

# Memcached is a high performance object cache
memcached:
image: autopilotpattern/memcached:latest
restart: always
mem_limit: 512m
env_file: _env
environment:
- CONSUL_AGENT=1
Expand All @@ -82,12 +82,12 @@ memcached:
labels:
- triton.cns.services=memcached
- com.docker.swarm.affinities=["container!=~*memcached*"]
- com.joyent.package=g4-highcpu-512M

# Nginx as a load-balancing tier and reverse proxy
nginx:
image: autopilotpattern/wordpress-nginx:latest
restart: always
mem_limit: 512m
ports:
- 80
- 443
Expand All @@ -98,16 +98,17 @@ nginx:
labels:
- triton.cns.services=nginx
- com.docker.swarm.affinities=["container!=~*nginx*"]
- com.joyent.package=g4-highcpu-512M

# Prometheus is an open source performance monitoring tool
# it is included here for demo purposes and is not required
prometheus:
image: autopilotpattern/prometheus:latest
restart: always
mem_limit: 1g
env_file: _env
ports:
- 9090
labels:
- triton.cns.services=prometheus
- com.docker.swarm.affinities=["container!=~*prometheus*"]
- com.joyent.package=g4-highcpu-1G

0 comments on commit ea60ea6

Please sign in to comment.