mirror of
https://github.com/cytopia/devilbox.git
synced 2025-05-02 16:53:04 +00:00
Adding project documentation
This commit is contained in:
parent
b85dda99d9
commit
d1c7c27a54
27
README.md
27
README.md
@ -9,13 +9,13 @@ There is currently a huge annoyance with docker on OSX resulting in very slow fi
|
||||
----
|
||||
|
||||
[Usage](https://github.com/cytopia/devilbox#usage) |
|
||||
[Video Tutorials](https://github.com/cytopia/devilbox#video-tutorials) |
|
||||
[Documentation](https://github.com/cytopia/devilbox#documentation) |
|
||||
[Run-time Matrix](https://github.com/cytopia/devilbox#run-time-matrix) |
|
||||
[Features](https://github.com/cytopia/devilbox#feature-overview) |
|
||||
[Intranet](https://github.com/cytopia/devilbox#intranet-overview) |
|
||||
[Contributing](https://github.com/cytopia/devilbox#contributing) |
|
||||
[Screenshots](https://github.com/cytopia/devilbox#screenshots) |
|
||||
[License](https://github.com/cytopia/devilbox/blob/master/LICENSE.md) |
|
||||
[Contributing](https://github.com/cytopia/devilbox#contributing) |
|
||||
[Todo](https://github.com/cytopia/devilbox/blob/master/CONTRIBUTING.md)
|
||||
|
||||
[](https://travis-ci.org/cytopia/devilbox)  [](https://www.docker.com/) [](https://opensource.org/licenses/MIT)
|
||||
@ -54,11 +54,17 @@ $ docker-compose up
|
||||
|
||||
[What is the `.env` file?](https://docs.docker.com/compose/env-file/)
|
||||
|
||||
## Video Tutorials
|
||||
## Documentation
|
||||
|
||||
**Video Tutorials**
|
||||
|
||||
[](https://www.youtube.com/watch?v=reyZMyt2Zzo)
|
||||
[](https://www.youtube.com/watch?v=e-U-C5WhxGY)
|
||||
|
||||
**Documentation**
|
||||
|
||||
For setup, usage and examples see detailed **[Documentation](https://github.com/cytopia/devilbox/blob/master/doc/README.md)**.
|
||||
|
||||
## Run-time Matrix
|
||||
|
||||
Select your prefered setup.
|
||||
@ -106,7 +112,6 @@ No need to install and configure different versions locally. Simply choose your
|
||||
| todo | todo | todo | todo |
|
||||
-->
|
||||
|
||||
|
||||
## Feature overview
|
||||
|
||||
* Dynamically Configured **Mass Virtual Hosting**
|
||||
@ -138,12 +143,6 @@ The devilbox comes with a pre-configured intranet on `http://localhost`
|
||||
* Opcache GUI
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
There is quite a lot todo and planned. If you like to contribute, view [CONTRIBUTING.md](https://github.com/cytopia/devilbox/blob/master/CONTRIBUTING.md) and [ROADMAP](https://github.com/cytopia/devilbox/issues/23).
|
||||
|
||||
Contributors will be credited within the intranet and on the github page.
|
||||
|
||||
|
||||
## Screenshots
|
||||
|
||||
@ -181,3 +180,11 @@ Shows you all the databases that are loaded
|
||||
Shows you all the emails that have been sent. No email will actually be sent outside, but they are all catched by one account and presented here.
|
||||
|
||||

|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
There is quite a lot todo and planned. If you like to contribute, view [CONTRIBUTING.md](https://github.com/cytopia/devilbox/blob/master/CONTRIBUTING.md) and [ROADMAP](https://github.com/cytopia/devilbox/issues/23).
|
||||
|
||||
Contributors will be credited within the intranet and on the github page.
|
||||
|
||||
|
82
doc/README.md
Normal file
82
doc/README.md
Normal file
@ -0,0 +1,82 @@
|
||||
# Documentation
|
||||
|
||||
## Adding projects
|
||||
|
||||
As an example, we are going to add two projects.
|
||||
|
||||
**Prerequisites**
|
||||
|
||||
For this case let's assume your www root folder points to `~/www`. This means your projects will reside on your host computer in your home directory under www.
|
||||
|
||||
In order to achive this set `HOST_PATH_TO_WWW_DOCROOTS=~/www` in the `.env` file (If this file does not yet exist, copy `env-example` to `.env`).
|
||||
|
||||
`.env`:
|
||||
```
|
||||
...
|
||||
HOST_PATH_TO_WWW_DOCROOTS=~/www
|
||||
...
|
||||
```
|
||||
|
||||
**Desired Projects**
|
||||
|
||||
| Project name | Document Root | URL |
|
||||
|--------------|---------------|-----|
|
||||
| devilbox | ~/www/devilbox/htdocs | http://devilbox.loc |
|
||||
| foo.bar | ~/www/foo.bar/htdocs | http://foo.bar.loc |
|
||||
|
||||
`htdocs` can either be a folder or a symlink to a folder.
|
||||
|
||||
**Project: devilbox**
|
||||
|
||||
Setup projects folder and an `index.php` (on your host computer)
|
||||
|
||||
```shell
|
||||
$ mkdir -p ~/www/devilbox/htdocs
|
||||
$ vim ~/devilbox/htdocs/index.php
|
||||
```
|
||||
|
||||
```php
|
||||
<?php
|
||||
echo 'hello world';
|
||||
?>
|
||||
```
|
||||
|
||||
Adjust your local (host computer) `/etc/hosts` and point `devilbox.loc` to your localhost address `127.0.0.1`
|
||||
|
||||
```shell
|
||||
$ sudo vim /etc/hosts
|
||||
```
|
||||
```shell
|
||||
127.0.0.1 devilbox.loc
|
||||
```
|
||||
|
||||
|
||||
**Project: foo.bar**
|
||||
|
||||
Setup projects folder and use existing github project to serve.
|
||||
|
||||
```shell
|
||||
$ mkdir -p ~/www/foo.bar
|
||||
$ cd ~/www/foo.bar
|
||||
|
||||
# Use an existing github project as your document root
|
||||
$ git clone https://github.com/<user>/<some-project>
|
||||
|
||||
# Symlink the project to htdocs
|
||||
$ ln -s <some-project> htdocs
|
||||
|
||||
$ ls -l
|
||||
drwxr-xr-x 4 cytopia 1286676289 136 Oct 30 14:24 <some-project>/
|
||||
lrwxr-xr-x 1 cytopia 1286676289 549 Nov 6 15:13 htdocs -> <some-project>/
|
||||
```
|
||||
|
||||
|
||||
Adjust your local (host computer) `/etc/hosts` and point `foo.bar.loc` to your localhost address `127.0.0.1`
|
||||
|
||||
```shell
|
||||
$ sudo vim /etc/hosts
|
||||
```
|
||||
```shell
|
||||
127.0.0.1 foo.bar.loc
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user