Compare commits

...

25 Commits

Author SHA1 Message Date
65078505c1 Merge pull request #123 from appleboy/patch-6
Added support upload file size setting.
2016-06-28 16:06:29 +03:00
e0b4734dab Added support upload file size setting.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-06-28 17:18:37 +08:00
243392444f Merge pull request #122 from LaraDock/Hotfix/mongo
Hotfix/mongo
2016-06-27 14:00:09 +03:00
72a8fc049d Merge branch 'zhikiri-hotfix/mongo-support'
* zhikiri-hotfix/mongo-support:
  Fix conflict merging zhikiri-hotfix/mongo-support
2016-06-27 13:59:24 +03:00
de6db93da8 Fix conflict merging zhikiri-hotfix/mongo-support 2016-06-27 13:58:48 +03:00
1af9dc5ac2 Merge pull request #121 from zhikiri/feature/mcrypt-extension
Added supporting of the mcrypt extenstion
2016-06-27 13:45:37 +03:00
62878e7c49 Added supporting of the mcrypt extenstion 2016-06-27 11:30:25 +03:00
3cd1f070e1 Merge pull request #118 from appleboy/patch-5
remove duplicate white spaces
2016-06-25 20:38:54 +03:00
fb5ea7f42c remove duplicate white spaces
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-06-25 19:40:36 +08:00
aa8be6f95b list the contributors names in the readme
@benmag @mattythebatty @AminMkh @appleboy
2016-06-25 07:36:03 +03:00
aa0a726945 change enter container commands in the doc
`docker-compose run …` to `docker exec -it …`
2016-06-25 07:33:30 +03:00
e5e04e4e18 update the readme: exec command to run 2016-06-23 08:58:43 +03:00
44d8720400 Merge pull request #115 from appleboy/patch-2
Change command about enter workspace container.
2016-06-23 08:52:37 +03:00
f0200626ba Merge pull request #114 from Kauhat/master
Added support to conditionally install Prestissimo
2016-06-23 08:36:48 +03:00
69406db3e0 Change command about enter workspace container. 2016-06-23 13:16:52 +08:00
bcb749151a Added support to conditionally install Prestissimo 2016-06-22 21:47:06 +01:00
ca413edff4 Merge pull request #112 from appleboy/patch-2
Fixed Change wrong project name.
2016-06-22 17:21:05 +03:00
f6d1d6f617 Fixed Change wrong project name. 2016-06-22 22:20:24 +08:00
117382a050 Merge branch 'pr/111'
(fix conflict)
* pr/111:
  add Node Version Manager (nvm)
2016-06-22 17:18:23 +03:00
2e930df2a7 Merge pull request #109 from appleboy/composer
Load xdebug Zend extension with phpunit command.
2016-06-22 16:57:08 +03:00
4922c5fafd add Node Version Manager (nvm)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-06-22 09:33:17 +08:00
198c38f6cd Load xdebug Zend extension with phpunit command.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-06-21 14:03:39 +08:00
8d216f83d5 Merge pull request #101 from appleboy/gd
Support gd extension.
2016-06-16 17:47:04 +03:00
05c5fcf216 Support gd extension.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-06-16 14:57:27 +08:00
fccee522c6 update the readme 2016-06-11 20:49:04 +03:00
9 changed files with 138 additions and 63 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
/logs /logs
.env

View File

@ -141,7 +141,7 @@ LaraDock and [Homestead](https://laravel.com/docs/master/homestead) both gives y
- LaraDock is a tool that controls Docker for you (using Docker Compose official commands). And Docker manages you Virtual Containers. - LaraDock is a tool that controls Docker for you (using Docker Compose official commands). And Docker manages you Virtual Containers.
Running a virtual Container is much faster than running a full virtual Machine. Running a virtual Container is much faster than running a full virtual Machine.
<br>Thus **LaraDock is much faster than Homestead**. <br>Thus **LaraDock is much faster than Homestead**.
@ -163,7 +163,7 @@ Running a virtual Container is much faster than running a full virtual Machine.
<a name="Demo"></a> <a name="Demo"></a>
## Demo Video ## Demo Video
What's better than a [**Demo Video**](https://www.youtube.com/watch?v=-DamFMczwDA) :) What's better than a [**Demo Video**](https://www.youtube.com/watch?v=-DamFMczwDA) :)
<a name="Installation"></a> <a name="Installation"></a>
## Installation ## Installation
@ -190,16 +190,15 @@ git clone https://github.com/LaraDock/laradock.git
## Usage ## Usage
1 - For **Windows & MAC** users only: If you are not using the native Docker-Engine `Beta`, make sure you have a running Docker Virtual Host on your machine. 1 - For **Windows & MAC** users only: If you are not using the native Docker-Engine `Beta`, make sure you have a running Docker Virtual Host on your machine.
[How to run a Docker Virtual Host?](#Run-Docker-Virtual-Host)
(**Linux** users don't need a Virtual Host, so skip this step). (**Linux** users don't need a Virtual Host, so skip this step).
[How to run a Docker Virtual Host?](#Run-Docker-Virtual-Host)
<br> <br>
2 - Run the Containers, (you can select the containers that you wish to run) 2 - Run some Containers: *(Make sure you are in the `laradock` folder before running the `docker-compose` commands).*
<br>
*Make sure you are in the `laradock` folder before running the `docker-compose` command.*
**Example:** Running NGINX and MySQL: **Example:** Running NGINX and MySQL:
@ -207,10 +206,14 @@ git clone https://github.com/LaraDock/laradock.git
docker-compose up -d nginx mysql docker-compose up -d nginx mysql
``` ```
*Note: the PHP-FPM, Workspace, Application and Data Containers will automatically run.* You can select your own combination of container form this list:
`nginx`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `memcached`, `beanstalkd`, `beanstalkd-console`, `workspace`, `data`, `php-fpm`, `application`.
**Note**: `workspace`, `data`, `php-fpm` and `application` will run automatically in most of the cases.
Supported Containers: `nginx`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `memcached`, `beanstalkd`, `beanstalkd-console`, `workspace`, `data`, `php-fpm`, `application`.
@ -220,7 +223,7 @@ Supported Containers: `nginx`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`,
```bash ```bash
docker exec -it {Workspace-Container-Name} bash docker exec -it {Workspace-Container-Name} bash
``` ```
Replace `{Workspace-Container-Name}` with your Workspace container name. Replace `{Workspace-Container-Name}` with your Workspace container name.
<br> <br>
To find the containers names type `docker-compose ps`. To find the containers names type `docker-compose ps`.
@ -303,7 +306,7 @@ docker-compose stop {container-name}
docker-compose down docker-compose down
``` ```
*Note: Careful with this command as it will delete your Data Volume Container as well. (if you want to keep your Database data than you should stop each container by itself as follow):* *Note: Careful with this command as it will delete your Data Volume Container as well. (if you want to keep your Database data than you should stop each container by itself as follow):*
@ -335,7 +338,7 @@ docker exec -it {container-name} bash
### Edit default container configuration ### Edit default container configuration
Open the `docker-compose.yml` and change anything you want. Open the `docker-compose.yml` and change anything you want.
Examples: Examples:
Change MySQL Database Name: Change MySQL Database Name:
@ -362,7 +365,7 @@ Change Redis defaut port to 1111:
<a name="Edit-a-Docker-Image"></a> <a name="Edit-a-Docker-Image"></a>
### Edit a Docker Image ### Edit a Docker Image
1 - Find the `dockerfile` of the image you want to edit, 1 - Find the `dockerfile` of the image you want to edit,
<br> <br>
example for `mysql` it will be `mysql/Dockerfile`. example for `mysql` it will be `mysql/Dockerfile`.
@ -421,7 +424,7 @@ To add an image (software), just edit the `docker-compose.yml` and add your cont
<br> <br>
<a name="View-the-Log-files"></a> <a name="View-the-Log-files"></a>
### View the Log files ### View the Log files
The Nginx Log file is stored in the `logs/nginx` directory. The Nginx Log file is stored in the `logs/nginx` directory.
However to view the logs of all the other containers (MySQL, PHP-FPM,...) you can run this: However to view the logs of all the other containers (MySQL, PHP-FPM,...) you can run this:
@ -461,7 +464,7 @@ For more about the Laravel installation click [here](https://laravel.com/docs/ma
3 - Edit `docker-compose.yml` to Map the new application path: 3 - Edit `docker-compose.yml` to Map the new application path:
By default LaraDock assumes the Laravel application is living in the parent directory of the laradock folder. By default LaraDock assumes the Laravel application is living in the parent directory of the laradock folder.
Since the new Laravel application is in the `my-cool-app` folder, we need to replace `../:/var/www/laravel` with `../my-cool-app/:/var/www/laravel`, as follow: Since the new Laravel application is in the `my-cool-app` folder, we need to replace `../:/var/www/laravel` with `../my-cool-app/:/var/www/laravel`, as follow:
@ -515,13 +518,6 @@ Composer update
phpunit phpunit
``` ```
<br> <br>
<a name="Use-Redis"></a> <a name="Use-Redis"></a>
### Use Redis ### Use Redis
@ -624,7 +620,7 @@ More details about this [here](https://github.com/jenssegers/laravel-mongodb#ins
5 - Test it: 5 - Test it:
- First let your Models extend from the Mongo Eloquent Model. Check the [documentation](https://github.com/jenssegers/laravel-mongodb#eloquent). - First let your Models extend from the Mongo Eloquent Model. Check the [documentation](https://github.com/jenssegers/laravel-mongodb#eloquent).
- Enter the Workspace Continer `docker exec -it laradock_workspace_1 bash`. - Enter the Workspace Container `docker exec -it laradock_workspace_1 bash`.
- Migrate the Database `php artisan migrate`. - Migrate the Database `php artisan migrate`.
@ -669,11 +665,11 @@ By default **PHP-FPM 7.0** is running.
2 - Search for `Dockerfile-70` in the PHP container section. 2 - Search for `Dockerfile-70` in the PHP container section.
3 - Change the version number. 3 - Change the version number.
<br> <br>
Example to select version 5.6 instead of 7.0 you have to replace `Dockerfile-70` with `Dockerfile-56`. Example to select version 5.6 instead of 7.0 you have to replace `Dockerfile-70` with `Dockerfile-56`.
Sample: Sample:
```txt ```txt
php-fpm: php-fpm:
@ -765,9 +761,9 @@ eval $(docker-machine env)
<br> <br>
<a name="Find-Docker-IP-Address"></a> <a name="Find-Docker-IP-Address"></a>
### Find your Docker IP Address ### Find your Docker IP Address
**On Windows & MAC:** **On Windows & MAC:**
Run this command in your terminal: Run this command in your terminal:
@ -783,7 +779,7 @@ If your Host name is different then `default`, you have to specify it (`docker-m
> **boot2docker** users: run `boot2docker ip` *(when boot2docker is up)*. > **boot2docker** users: run `boot2docker ip` *(when boot2docker is up)*.
<br> <br>
**On Linux:** **On Linux:**
Run this command in your terminal: Run this command in your terminal:
@ -870,8 +866,22 @@ Additionally, you can contact Mahmoud Zalt (the creator of this project) via a d
## Credits ## Credits
- [Mahmoud Zalt](https://github.com/Mahmoudz) (Twitter [@Mahmoud_Zalt](https://twitter.com/Mahmoud_Zalt)) **Creator:**
- [Awesome list of contributors](https://github.com/LaraDock/laradock/graphs/contributors)
- [Mahmoud Zalt](https://github.com/Mahmoudz) (Twitter [@Mahmoud_Zalt](https://twitter.com/Mahmoud_Zalt))
**Main Contributors:**
- [Bo-Yi Wu](https://github.com/appleboy)
- [Amin Mkh](https://github.com/AminMkh)
- [Matthew Tonkin Dunn](https://github.com/mattythebatty)
- [Benmag](https://github.com/benmag)
**Awesome People:**
- [Contributors](https://github.com/LaraDock/laradock/graphs/contributors)
- [Supporters](https://github.com/LaraDock/laradock/issues?utf8=%E2%9C%93&q=)
## License ## License

View File

@ -153,7 +153,10 @@ services:
### Workspace Utilities Container ########################### ### Workspace Utilities Container ###########################
workspace: workspace:
build: ./workspace build:
context: ./workspace
args:
INSTALL_PRESTISSIMO: ${INSTALL_PRESTISSIMO}
volumes_from: volumes_from:
- application - application
tty: true tty: true

View File

@ -15,6 +15,7 @@ http {
tcp_nodelay on; tcp_nodelay on;
keepalive_timeout 15; keepalive_timeout 15;
types_hash_max_size 2048; types_hash_max_size 2048;
client_max_body_size 20M;
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
default_type application/octet-stream; default_type application/octet-stream;
access_log on; access_log on;

View File

@ -9,13 +9,29 @@ RUN apt-get update && apt-get install -y \
libpq-dev \ libpq-dev \
libmemcached-dev \ libmemcached-dev \
curl \ curl \
libpng12-dev \
libfreetype6-dev \
libssl-dev \
libmcrypt-dev \
--no-install-recommends \ --no-install-recommends \
&& rm -r /var/lib/apt/lists/* && rm -r /var/lib/apt/lists/*
# install mcrypt library
RUN docker-php-ext-install mcrypt
# Install mongodb driver
RUN pecl install mongodb
# configure gd library
RUN docker-php-ext-configure gd \
--enable-gd-native-ttf \
--with-freetype-dir=/usr/include/freetype2
# Install extensions using the helper script provided by the base image # Install extensions using the helper script provided by the base image
RUN docker-php-ext-install \ RUN docker-php-ext-install \
pdo_mysql \ pdo_mysql \
pdo_pgsql pdo_pgsql \
gd
# Install memcached # Install memcached
RUN pecl install memcached \ RUN pecl install memcached \
@ -25,9 +41,6 @@ RUN pecl install memcached \
RUN pecl install xdebug \ RUN pecl install xdebug \
&& docker-php-ext-enable xdebug && docker-php-ext-enable xdebug
# Install mongodb driver
RUN pecl install mongodb
RUN usermod -u 1000 www-data RUN usermod -u 1000 www-data
WORKDIR /var/www/laravel WORKDIR /var/www/laravel

View File

@ -9,13 +9,29 @@ RUN apt-get update && apt-get install -y \
libpq-dev \ libpq-dev \
libmemcached-dev \ libmemcached-dev \
curl \ curl \
libpng12-dev \
libfreetype6-dev \
libssl-dev \
libmcrypt-dev \
--no-install-recommends \ --no-install-recommends \
&& rm -r /var/lib/apt/lists/* && rm -r /var/lib/apt/lists/*
# install mcrypt library
RUN docker-php-ext-install mcrypt
# Install mongodb driver
RUN pecl install mongodb
# configure gd library
RUN docker-php-ext-configure gd \
--enable-gd-native-ttf \
--with-freetype-dir=/usr/include/freetype2
# Install extensions using the helper script provided by the base image # Install extensions using the helper script provided by the base image
RUN docker-php-ext-install \ RUN docker-php-ext-install \
pdo_mysql \ pdo_mysql \
pdo_pgsql pdo_pgsql \
gd
# Install memcached # Install memcached
RUN pecl install memcached \ RUN pecl install memcached \
@ -25,9 +41,6 @@ RUN pecl install memcached \
RUN pecl install xdebug \ RUN pecl install xdebug \
&& docker-php-ext-enable xdebug && docker-php-ext-enable xdebug
# Install mongodb driver
RUN pecl install mongodb
RUN usermod -u 1000 www-data RUN usermod -u 1000 www-data
WORKDIR /var/www/laravel WORKDIR /var/www/laravel

View File

@ -9,13 +9,29 @@ RUN apt-get update && apt-get install -y \
libpq-dev \ libpq-dev \
libmemcached-dev \ libmemcached-dev \
curl \ curl \
libpng12-dev \
libfreetype6-dev \
libssl-dev \
libmcrypt-dev \
--no-install-recommends \ --no-install-recommends \
&& rm -r /var/lib/apt/lists/* && rm -r /var/lib/apt/lists/*
# install mcrypt library
RUN docker-php-ext-install mcrypt
# Install mongodb driver
RUN pecl install mongodb
# configure gd library
RUN docker-php-ext-configure gd \
--enable-gd-native-ttf \
--with-freetype-dir=/usr/include/freetype2
# Install extensions using the helper script provided by the base image # Install extensions using the helper script provided by the base image
RUN docker-php-ext-install \ RUN docker-php-ext-install \
pdo_mysql \ pdo_mysql \
pdo_pgsql pdo_pgsql \
gd
# Install Memcached for php 7 # Install Memcached for php 7
RUN curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz" \ RUN curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz" \
@ -29,9 +45,6 @@ RUN curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-m
RUN pecl install xdebug \ RUN pecl install xdebug \
&& docker-php-ext-enable xdebug && docker-php-ext-enable xdebug
# Install mongodb driver
RUN pecl install mongodb
RUN usermod -u 1000 www-data RUN usermod -u 1000 www-data
WORKDIR /var/www/laravel WORKDIR /var/www/laravel

View File

@ -2,3 +2,13 @@ date.timezone=UTC
display_errors=Off display_errors=Off
log_errors=On log_errors=On
extension=mongodb.so extension=mongodb.so
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 128M
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 20M
; Sets max size of post data allowed.
; http://php.net/post-max-size
post_max_size = 20M

View File

@ -34,6 +34,8 @@ RUN apt-get update && apt-get install -y --force-yes \
php7.0-sqlite3 \ php7.0-sqlite3 \
php7.0-zip \ php7.0-zip \
php7.0-memcached \ php7.0-memcached \
php7.0-gd \
php7.0-xdebug \
php-dev \ php-dev \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libedit-dev \ libedit-dev \
@ -45,37 +47,40 @@ RUN apt-get update && apt-get install -y --force-yes \
git \ git \
curl \ curl \
vim \ vim \
nano \ nano
nodejs \
nodejs-dev \
npm
# Clean up, to free some space # Clean up, to free some space
RUN apt-get clean RUN apt-get clean
# Install gulp and bower with NPM # remove load xdebug extension (only load on phpunit command)
RUN npm install -g \ RUN sed -i 's/^/;/g' /etc/php/7.0/cli/conf.d/20-xdebug.ini
gulp \
bower
# Link the global gulp to be used locally # Add bin folder of composer to PATH.
RUN npm link gulp RUN echo "export PATH=${PATH}:/var/www/laravel/vendor/bin" >> ~/.bashrc
# Add a symbolic link for Node
RUN ln -s /usr/bin/nodejs /usr/bin/node
# Add an alias for PHPUnit
RUN echo "alias phpunit='./vendor/bin/phpunit'" >> ~/.bashrc
# Install Composer # Install Composer
RUN curl -s http://getcomposer.org/installer | php \ RUN curl -s http://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/ \ && mv composer.phar /usr/local/bin/composer
&& echo "alias composer='/usr/local/bin/composer.phar'" >> ~/.bashrc
# Load xdebug Zend extension with phpunit command
RUN echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/laravel/vendor/bin/phpunit'" >> ~/.bashrc
# Install mongodb extension # Install mongodb extension
RUN pecl install mongodb RUN pecl install mongodb
RUN echo "extension=mongodb.so" >> /etc/php/7.0/cli/php.ini RUN echo "extension=mongodb.so" >> /etc/php/7.0/cli/php.ini
# Install nvm (Node Version Manager)
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
ENV NVM_DIR=/root/.nvm
# Install stable node
RUN . ~/.nvm/nvm.sh \
&& nvm install stable \
&& nvm use stable \
&& nvm alias stable \
&& npm install -g gulp bower
# Source the bash # Source the bash
RUN . ~/.bashrc RUN . ~/.bashrc
@ -83,3 +88,9 @@ RUN . ~/.bashrc
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /var/www/laravel WORKDIR /var/www/laravel
# Install optional software
ARG INSTALL_PRESTISSIMO=false
RUN if [ "$INSTALL_PRESTISSIMO" = true ] ; then \
composer global require "hirak/prestissimo:^0.3"; \
fi