-
Notifications
You must be signed in to change notification settings - Fork 94
/
devstl_protected_load_balanced_wordpress.pmx
60 lines (55 loc) · 1.83 KB
/
devstl_protected_load_balanced_wordpress.pmx
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
name: DevStL Protected Load Balanced WordPress
description: Load Balanced WordPress with ClamAV.
keywords: WordPress, load-balanced, anti-virus, MySQL
type: Wordpress
documentation: |
Wordpress with MySQL
============================
The alias for the link between Wordpress and MySQL needs to be _DB_1_. If this is changed, the template will not work.
Also, the password can be changed, but the environmental variables need to be changed on both services.
To view the GUI after launching the template, map your local host machine to port _8080_. If using Virtual Box, use the following command in your terminal to create the port forwarding rule:
`VBoxManage controlvm panamax-vm natpf1 wordpress,tcp,,8997,,8080`
Where, wordpress is the friendly name of the rule, tcp is the protocol. Replace port _8997_ with the local free port of your choice. If you change the port bindings on the Wordpress service, _8080_ will need to be changed to match that too.
After you run this command locally, browse to **http://localhost:8997** to see the GUI, as per the example.
images:
- name: DB
source: centurylink/mysql:5.5
category: DB Tier
type: mysql
ports:
- host_port: 3306
container_port: 3306
environment:
- variable: MYSQL_ROOT_PASSWORD
value: pass@word01
- name: WP
source: centurylink/wordpress:3.9.1
category: Web Tier
type: wordpress
ports:
- host_port: 8080
container_port: 80
links:
- service: DB
alias: DB_1
environment:
- variable: DB_PASSWORD
value: pass@word01
- variable: DB_NAME
value: wordpress
- name: nginx
source: nginx:latest
category: Load Balancer
type: Default
ports:
- host_port: '7777'
container_port: '80'
proto: TCP
links:
- service: WP
alias: WP
- name: blacktop_clamav
source: blacktop/clamav:latest
category: Load Balancer
type: Default