forked from CenturyLinkLabs/panamax-contest-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
laravel_with_mysql.pmx
49 lines (43 loc) · 1.58 KB
/
laravel_with_mysql.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
name: Laravel with MySQL
description: Laravel container linked to a MySQL container
keywords: php, laravel, mysql, composer
documentation: |
Laravel with MySQL
============================
The alias for the link between Laravel 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 laravel,tcp,,8997,,8080`
Where, Laravel 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 Laravel 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.
authors:
type: LAMP
images:
- name: DB
source: centurylink/mysql:5.5
description: MySQL
environment:
- variable: MYSQL_ROOT_PASSWORD
value: pass@word01
ports:
- host_port: 3306
container_port: 3306
category: DB Tier
type: mysql
- name: Web
source: dmyers/laravel:latest
description: Laravel application
environment:
- variable: DB_PASSWORD
value: pass@word01
- variable: DB_NAME
value: laravel
links:
- service: DB
alias: DB_1
ports:
- host_port: 8080
container_port: 80
category: Web Tier
type: Default