-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
31 lines (31 loc) · 832 Bytes
/
docker-compose.yml
File metadata and controls
31 lines (31 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#Created by Kendrick Coleman of the EMC {code} Team and Licensed under MIT.
#
# This wordpress installation is meant to be deployed to a Docker Swarm Cluster
# This will demonstrate how to use data persistence across hosts in a swarm cluser
# Use rexray to create two volumes called `mysqldata` and `wpdata`. This datastore
# will persist while containers are created and destroyed across hosts
#
# docker-compose up -d
---
mysql:
image: mysql
ports:
- "3306:3306"
environment:
- "MYSQL_ROOT_PASSWORD=87654321"
volume_driver: rexray
volumes:
- "mysqldata:/var/lib/mysql"
restart: always
wordpress:
image: wordpress
ports:
- "8080:80"
environment:
- "WORDPRESS_DB_PASSWORD=87654321"
volume_driver: rexray
volumes:
- "wpdata:/var/www/html"
restart: always
links:
- mysql