Compare commits

...

11 Commits

Author SHA1 Message Date
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
4 changed files with 40 additions and 39 deletions

1
.gitignore vendored
View File

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

View File

@ -221,7 +221,7 @@ You can select your own combination of container form this list:
3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, ...). 3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, ...).
```bash ```bash
docker exec -it {Workspace-Container-Name} bash docker-compose run workspace bash
``` ```
Replace `{Workspace-Container-Name}` with your Workspace container name. Replace `{Workspace-Container-Name}` with your Workspace container name.
<br> <br>
@ -323,7 +323,7 @@ docker-compose down
2 - enter any container using: 2 - enter any container using:
```bash ```bash
docker exec -it {container-name} bash docker-compose run {container-name} bash
``` ```
3 - to exit a container, type `exit`. 3 - to exit a container, type `exit`.
@ -494,19 +494,13 @@ You can run artisan commands and many other Terminal commands from the Workspace
docker-compose up -d workspace // ..and all your other containers docker-compose up -d workspace // ..and all your other containers
``` ```
2 - Find the Workspace container name: 2 - Enter the Workspace container:
```bash ```bash
docker-compose ps docker-compose run workspace /bin/bash
``` ```
3 - Enter the Workspace container: 3 - Run anything you want :)
```bash
docker exec -it {workspace-container-name} bash
```
4 - Run anything you want :)
```bash ```bash
php artisan php artisan
@ -518,13 +512,6 @@ Composer update
phpunit phpunit
``` ```
<br> <br>
<a name="Use-Redis"></a> <a name="Use-Redis"></a>
### Use Redis ### Use Redis
@ -627,7 +614,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 Continer `docker-compose run workspace bash`.
- Migrate the Database `php artisan migrate`. - Migrate the Database `php artisan migrate`.

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

@ -35,6 +35,7 @@ RUN apt-get update && apt-get install -y --force-yes \
php7.0-zip \ php7.0-zip \
php7.0-memcached \ php7.0-memcached \
php7.0-gd \ php7.0-gd \
php7.0-xdebug \
php-dev \ php-dev \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
libedit-dev \ libedit-dev \
@ -46,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
@ -84,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