You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 25, 2022. It is now read-only.
Run the following commands in a folder of your choice:
15
+
1.Run the following commands in a folder of your choice:
27
16
28
17
$ vagrant init joomlatools/box
29
18
$ vagrant up
30
19
31
-
This will download the Vagrant box and get it running.
32
-
33
-
Note that this requires a 700 MB download for the first run and Vagrant version 1.5 or later. If you want to perform an offline installation or on an older Vagrant version, [download the box here](https://vagrantcloud.com/joomlatools/box/version/3/provider/virtualbox.box) and run the following commands instead:
This will download the Vagrant box and get it running.
37
21
38
-
Add the following line into your ***hosts file*** (/etc/hosts on Linux and MacOS, for other operating systems see [here](http://en.wikipedia.org/wiki/Hosts_(file)#Location_in_the_file_system))
22
+
1.Add the following line into your ***hosts file*** (/etc/hosts on Linux and MacOS, for other operating systems see [here](http://en.wikipedia.org/wiki/Hosts_(file)#Location_in_the_file_system))
Apache serves files from the www/ folder using the IP:
60
-
61
-
http://33.33.33.58/
62
-
63
-
If you have setup your hosts file correctly as shown above, you can now also access the default www/ folder at:
64
-
65
-
http://joomla.box/
66
-
67
-
It is advised to use virtual hosts for development. See below for our virtual host manager.
68
-
69
-
SSH
70
-
---
71
-
You can reach the box by using the command:
72
-
73
-
$ vagrant ssh
74
-
75
-
Joomla Site Manager
76
-
-------------------
77
-
78
-
The Vagrant box has our [Joomla Console](https://github.com/joomlatools/joomla-console) script pre-installed.
79
-
To create a site with the latest Joomla version, run:
80
-
81
-
joomla site:create testsite
82
-
83
-
The newly installed site will be available in the /testsite subfolder at http://joomla.box/testsite after that. The files are located at /var/www/testsite.
84
-
You can login into your fresh Joomla installation using these credentials: `admin` / `admin`.
85
-
86
-
For more information, please refer to the [Joomla Console](https://github.com/joomlatools/joomla-console) repository.
87
-
88
-
*Note*: The script also creates a new virtual host when creating a new site. If you add the following line into your /etc/hosts file on your host machine:
89
-
90
-
33.33.33.58 testsite.dev
91
-
92
-
you can access it directly at http://testsite.dev.
26
+
1. The dashboard is now available at [joomla.box](http://joomla.box)
93
27
94
-
Symlink your code into a Joomla installation
95
-
--------------------------------------------
96
-
Let's say you are working on your own Joomla component called _Awesome_ and want to continue working on it using the Vagrant box. You can use the _Projects_ folder in the repository root for your projects.
28
+
There will be two new folders created called `www` and `Projects`. These folders act as shared folders between your host computer and the box.
97
29
98
-
But if you would like to use a custom folder we should start by making the source code available to the Vagrant box. Let's assume the source code is located at _/Users/myname/Projects/awesome_ :
30
+
Getting started
31
+
---------------
99
32
100
-
Copy the ```config.custom.yaml-dist``` file to ```config.custom.yaml``` and edit with your favorite text editor. Make it look like this:
33
+
1. Once you have installed the box as described above, SSH into the box:
101
34
102
-
synced_folders:
103
-
/home/vagrant/Projects: /Users/myname/Projects
35
+
$ vagrant ssh
104
36
105
-
Save this file and restart the Vagrant box. (```vagrant reload```)
37
+
1. Create your first Joomla website with this command:
106
38
107
-
The "Projects" folder from your host machine will now be available inside the Vagrant box through _/home/vagrant/Projects_.
39
+
$ joomla site:create mysite
108
40
109
-
Next step is to create the new site you'll be working on. SSH into the box (```vagrant ssh```) and execute the following command:
41
+
1. Your new site is available at [joomla.box/mysite](http://joomla.box/mysite). You can login using the credentials `admin` / `admin`.
1. You can now symlink and install your custom extensions into the site, manage PHP versions and much more. Head over to our [documentation pages](http://developer.joomlatools.com/tools/vagrant/introduction.html) to learn more about the box and its possibilities.
112
44
113
-
Or to symlink your code into an existing site:
114
45
115
-
joomla extension:symlink testsite awesome
116
-
117
-
Run discover install to make your component available to Joomla and you are good to go!
118
-
119
-
For more information on the symlinker, refer to the [Joomla Console README](https://github.com/joomlatools/joomla-console) or run:
120
-
121
-
joomla extension:symlink --help
122
-
123
-
124
-
MySQL
125
-
-----
126
-
127
-
After you modify /etc/hosts as shown above you can use phpMyAdmin at
128
-
129
-
http://phpmyadmin.joomla.box
130
-
131
-
You can also connect using any MySQL client with these details:
132
-
133
-
Host: 33.33.33.58
134
-
User: root
135
-
Password: root
136
-
137
-
138
-
Managing multiple PHP Versions
139
-
------------------------------
140
-
141
-
We have included a script that can build and install any PHP version from 5.2.0 and up automatically. This is ideal to try out your code on new PHP releases or to fix bugs that have been reported on older PHP installations.
142
-
143
-
To get a list of available PHP versions, SSH into the box and run:
144
-
145
-
phpmanager versions
146
-
147
-
To install one of the available versions, for example 5.2.16, execute:
148
-
149
-
phpmanager use 5.2.16
150
-
151
-
The script will check if this version has been installed and if not, will attempt to build it. Please note that building PHP might take a while. Depending on your system, this could take between 5 and 45 minutes.
152
-
153
-
If you want to test your code against the latest and greatest of PHP, you can call ```phpmanager use master```. Each time you build the master branch the script will pull in the latest changes from the PHP Git repository.
154
-
155
-
To restore the original PHP installation again, run:
156
-
157
-
phpmanager restore
158
-
159
-
For more options, run ```phpmanager --help```. To see this script in action, refer to this [screencast](http://quick.as/5aw1ulxx).
160
-
161
-
APC and XDebug
162
-
--------------
163
-
164
-
You can easily turn XDebug and APC on or off after SSHing into the Vagrant box:
46
+
For hacking on the box
47
+
----------------------
165
48
166
-
xdebug enable|disable
167
-
apc enable|disable
49
+
If you want to make changes to the box's infrastructure, you can do so by building the box from scratch. Follow these steps to get started:
You can always access the APC dashboard through the /apc folder. (```http://joomla.box/apc```)
55
+
1. Install required Vagrant plugins
174
56
175
-
Webgrind
176
-
--------
57
+
$ vagrant plugin install vagrant-puppet-install
58
+
$ vagrant plugin install vagrant-vbguest
177
59
178
-
After you modify /etc/hosts as shown above go to
60
+
1. Go to the repository folder and provision the box:
179
61
180
-
http://webgrind.joomla.box
62
+
$ cd joomla-vagrant
63
+
$ vagrant up
181
64
182
-
SFTP
183
-
----
65
+
1. You can now edit the Puppet configuration. To apply your changes, provision the box again:
184
66
185
-
Use following details to connect:
67
+
$ vagrant provision
186
68
187
-
Host: 127.0.0.1
188
-
Port: 2222
189
-
User: vagrant
190
-
Password: vagrant
191
69
192
70
Reporting issues
193
71
----------------
@@ -196,11 +74,13 @@ We deliberately keep the Issues section on Github closed for now as we want to e
196
74
197
75
Of course, it's not always easy to fix an obscure bug in someone else's code, but we still want to encourage everyone to make an effort. We do not have the intention to maintain a support forum here just yet!
198
76
77
+
199
78
Contributing
200
79
------------
201
80
202
81
Fork the project, create a feature branch from the `develop` branch, and send us a pull request.
0 commit comments