Compare commits

...

20 Commits

Author SHA1 Message Date
06337e6024 Merge pull request #144 from appleboy/patch-7
#140 update php 5.5 and 5.6
2016-07-14 15:29:54 +03:00
16b82d066e #140 update php 5.5 and 5.6
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-07-14 09:56:05 +08:00
074deec781 Merge branch 'master' of https://github.com/LaraDock/laradock
* 'master' of https://github.com/LaraDock/laradock:
  fix the volumes mapping
2016-07-14 04:28:12 +03:00
2d382b683a general updates to the readme 2016-07-14 04:27:45 +03:00
68576f9022 fix the volumes mapping 2016-07-13 17:04:06 +03:00
2df00ecdad remove installing Prestissimo by default, to prevent the warning 2016-07-13 16:00:47 +03:00
aeb5a6bb63 Merge pull request #140 from yewjs/patch-1
Update Dockerfile-70
2016-07-13 15:50:31 +03:00
2bbf59ddda Merge pull request #139 from Kauhat/master
Database volume mapping changes & documentation
2016-07-13 15:47:17 +03:00
dca0545293 Fixed incorrect php-fpm container mapping 2016-07-13 10:44:17 +01:00
5f99478c76 Fixed workspace container mapping volumes to wrong container 2016-07-13 10:08:13 +01:00
48a53f1d24 Update Dockerfile-70
install libJPEG and enabled in GD
2016-07-13 14:12:32 +08:00
11cdfd440b Updated README
References #135
2016-07-12 17:52:06 +01:00
14cbe9f935 Moved volume container definitions
I've placed the `application` and `data` directories into a `volumes`
subdirectory. The top level `data` directory is now used for storing the
data used by the database (and other, if any) containers. The `data`
directory has also been added to the `.gitignore` file to prevent
accidental pushing of user data.
2016-07-12 17:11:57 +01:00
42d63236f1 Changed the data container volume mappings
All of the database data volume mapping have been changed from the host's
`/var/lib` directory to locally alongside the laradock installation. This
should hopefully prevent issues where data disappears after containers are
restarted or data on the host machine is overwritten by accident (scary!)

Additionally this should make data easier to backup between installations
- especially on Windows where `/var` does not exist and is created
  transparently by Docker Machine/Windows beta.

This change will most likely cause data to disappear from existing
installations, however it may reappear if moved to it's new home.

References #137, #138
2016-07-12 16:39:08 +01:00
d01d087431 Added more detail to the README 2016-07-12 16:38:20 +01:00
11c65c4a00 Fix variable not set warning
Added an untracked `.env` file to the root directory to prevent the
`WARNING: The INSTALL_PRESTISSIMO variable is not set` message from being
displayed when `docker-compose` is run.

Added section in README for optional features.
2016-07-12 16:27:55 +01:00
1b9630e8a1 Merge pull request #132 from Niksac/fix-readme
Update README.md
2016-07-07 21:39:26 +03:00
3a714339da Update README.md 2016-07-07 15:29:00 +02:00
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
11 changed files with 89 additions and 68 deletions

1
.env Normal file
View File

@ -0,0 +1 @@
INSTALL_PRESTISSIMO=false

1
.gitignore vendored
View File

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

View File

@ -7,6 +7,7 @@ LaraDock helps you run your **Laravel** App on **Docker** real quick.
<br> <br>
It's like Laravel Homestead but for Docker instead of Vagrant. It's like Laravel Homestead but for Docker instead of Vagrant.
>With LaraDock, use Docker first and learn about it later.
![](http://s18.postimg.org/fhykchl09/new_laradock_cover.png) ![](http://s18.postimg.org/fhykchl09/new_laradock_cover.png)
@ -49,6 +50,7 @@ It's like Laravel Homestead but for Docker instead of Vagrant.
- [Run a Docker Virtual Host](#Run-Docker-Virtual-Host) - [Run a Docker Virtual Host](#Run-Docker-Virtual-Host)
- [Find your Docker IP Address](#Find-Docker-IP-Address) - [Find your Docker IP Address](#Find-Docker-IP-Address)
- [Use custom Domain](#Use-custom-Domain) - [Use custom Domain](#Use-custom-Domain)
- [Install Prestissimo](#Install-Prestissimo)
- [Debugging](#debugging) - [Debugging](#debugging)
- [Help & Questions](#Help) - [Help & Questions](#Help)
@ -98,7 +100,7 @@ docker-compose up nginx mysql redis
- Memcached - Memcached
- Beanstalkd - Beanstalkd
- Beanstalkd Console - Beanstalkd Console
- Workspace (contains: Composer, PHP7-CLI, Laravel Installer, Git, Node, Gulp, Bower, SQLite, Vim, Nano and cURL) - Workspace (contains: Composer, PHP7-CLI, Laravel Installer, Git, Node, Gulp, Bower, SQLite, Vim, Nano, cURL and much more)
- Data *(Databases Data Container)* - Data *(Databases Data Container)*
- Application *(Application Code Container)* - Application *(Application Code Container)*
@ -112,7 +114,7 @@ docker-compose up nginx mysql redis
<a name="what-is-docker"></a> <a name="what-is-docker"></a>
### What is Docker? ### What is Docker?
[Docker](https://www.docker.com) is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of [operating-system-level virtualization](https://en.wikipedia.org/wiki/Operating-system-level_virtualization) on Linux, Mac OS and Windows. [Docker](https://www.docker.com) is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of [operating-system-level virtualization](https://en.wikipedia.org/wiki/Operating-system-level_virtualization) on Linux, Mac OS and Windows.
<a name="what-is-laravel"></a> <a name="what-is-laravel"></a>
### What is Laravel? ### What is Laravel?
@ -127,7 +129,7 @@ Seriously!!!
Instead of providing a full Virtual Machines, like you get with Vagrant, Docker provides you **lightweight** Virtual Containers, that share the same kernel and allow to safely execute independent processes. Instead of providing a full Virtual Machines, like you get with Vagrant, Docker provides you **lightweight** Virtual Containers, that share the same kernel and allow to safely execute independent processes.
In addition to the speed, Docker gives tens of features that cannot be achieved with Vagrant. In addition to the speed, Docker gives tons of features that cannot be achieved with Vagrant.
Most importantly Docker can run on Development and on Production (same environment everywhere). While Vagrant is designed for Development only, (so you have to re-provision your server on Production every time). Most importantly Docker can run on Development and on Production (same environment everywhere). While Vagrant is designed for Development only, (so you have to re-provision your server on Production every time).
@ -139,26 +141,21 @@ LaraDock and [Homestead](https://laravel.com/docs/master/homestead) both gives y
- Homestead is a tool that controls Vagrant for you (using Homestead special commands). And Vagrant manages your Virtual Machine. - Homestead is a tool that controls Vagrant for you (using Homestead special commands). And Vagrant manages your Virtual Machine.
- 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 & Docker Compose official commands). And Docker manages your 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. Thus **LaraDock is much faster than Homestead**.
<br>Thus **LaraDock is much faster than Homestead**.
<a name="Requirements"></a> <a name="Requirements"></a>
## Requirements ## Requirements
| Linux | Windows & MAC | | Linux | Windows & MAC |
|-----------------------------------------------------------------------------------------|---------------------------------------------------------| |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| [Laravel](https://laravel.com/docs/master/installation) | [Laravel](https://laravel.com/docs/master/installation) | | [Laravel](https://laravel.com/docs/master/installation) | [Laravel](https://laravel.com/docs/master/installation) |
| [Git](https://git-scm.com/downloads) | [Git](https://git-scm.com/downloads) | | [Git](https://git-scm.com/downloads) | [Git](https://git-scm.com/downloads) |
| [Docker Engine](https://docs.docker.com/engine/installation/linux/ubuntulinux) | [Docker Toolbox](https://www.docker.com/toolbox) | | [Docker Engine](https://docs.docker.com/engine/installation/linux/ubuntulinux) | [Docker Toolbox](https://www.docker.com/toolbox) OR [Native Docker](https://beta.docker.com/) |
| [Docker Compose](https://docs.docker.com/compose/install) | | | [Docker Compose](https://docs.docker.com/compose/install) | |
<a name="Demo"></a> <a name="Demo"></a>
## Demo Video ## Demo Video
@ -259,6 +256,7 @@ If you need a special support. Contact me, more details in the [Help & Questions
<a name="Documentation"></a> <a name="Documentation"></a>
## Documentation ## Documentation
**Note:** this documentation doesn't cover the Docker Beta *(Native Docker on MAC and Windows)*. However, the commands are very similar. We are planning to cover the Docker Beta soon.
<a name="Docker"></a> <a name="Docker"></a>
@ -822,30 +820,33 @@ server_name laravel.dev;
``` ```
<br>
<a name="Install-Prestissimo"></a>
### Install Prestissimo
[Prestissimo](https://github.com/hirak/prestissimo) is a plugin for composer which enables parallel install functionality. You can enable Prestissimo by setting `INSTALL_PRESTISSIMO=true` in the `docker-compose.yml` file.
<br> <br>
<a name="debugging"></a> <a name="debugging"></a>
### Debugging ### Debugging
*Here's a list of the common problems you might face, and the possible solutions.* *Here's a list of the common problems you might face, and the possible solutions.*
#### + I see a blank (white) page instead of the Laravel 'Welcome' page! #### I see a blank (white) page instead of the Laravel 'Welcome' page!
run this command from the Laravel root directory: Run the following command from the Laravel root directory:
```bash ```bash
sudo chmod -R 777 storage bootstrap/cache sudo chmod -R 777 storage bootstrap/cache
``` ```
#### + I see "Welcome to nginx" instead of the Laravel App! #### I see "Welcome to nginx" instead of the Laravel App!
use `http://127.0.0.1` instead of `http://localhost` in your browser.
Use `http://127.0.0.1` (or [your Docker IP](#Find-Docker-IP-Address)) instead of `http://localhost` in your browser.
#### I see an error message containing `address already in use`
Make sure the ports for the services that you are trying to run (80, 3306, etc.) are not being used already by other programs, such as a built in `apache`/`httpd` service or other development tools you have installed.
<br> <br>
@ -872,6 +873,7 @@ Additionally, you can contact Mahmoud Zalt (the creator of this project) via a d
**Main Contributors:** **Main Contributors:**
- [Jack Fletcher](https://github.com/Kauhat)
- [Bo-Yi Wu](https://github.com/appleboy) - [Bo-Yi Wu](https://github.com/appleboy)
- [Amin Mkh](https://github.com/AminMkh) - [Amin Mkh](https://github.com/AminMkh)
- [Matthew Tonkin Dunn](https://github.com/mattythebatty) - [Matthew Tonkin Dunn](https://github.com/mattythebatty)

View File

@ -2,45 +2,12 @@ version: '2'
services: services:
### PHP-FPM Container #######################################
php-fpm:
build:
context: ./php-fpm
dockerfile: Dockerfile-70
volumes_from:
- application
expose:
- "9000"
links:
- workspace
### Laravel Application Code Container ######################
application:
build: ./application
volumes:
- ../:/var/www/laravel
### Databases Data Container ################################
data:
build: ./data
volumes:
- /var/lib/mysql:/var/lib/mysql
- /var/lib/postgres:/var/lib/postgres
- /var/lib/mariadb:/var/lib/mariadb
- /var/lib/memcached:/var/lib/memcached
- /var/lib/redis:/data
- /var/lib/neo4j:/var/lib/neo4j/data
- /var/lib/mongo:/data/db
### Nginx Server Container ################################## ### Nginx Server Container ##################################
nginx: nginx:
build: ./nginx build: ./nginx
volumes_from: volumes_from:
- application - volumes_source
volumes: volumes:
- ./logs/nginx/:/var/log/nginx - ./logs/nginx/:/var/log/nginx
ports: ports:
@ -49,12 +16,25 @@ services:
links: links:
- php-fpm - php-fpm
### PHP-FPM Container #######################################
php-fpm:
build:
context: ./php-fpm
dockerfile: Dockerfile-70
volumes_from:
- volumes_source
expose:
- "9000"
links:
- workspace
### MySQL Container ######################################### ### MySQL Container #########################################
mysql: mysql:
build: ./mysql build: ./mysql
volumes_from: volumes_from:
- data - volumes_data
ports: ports:
- "3306:3306" - "3306:3306"
environment: environment:
@ -68,7 +48,7 @@ services:
postgres: postgres:
build: ./postgres build: ./postgres
volumes_from: volumes_from:
- data - volumes_data
ports: ports:
- "5432:5432" - "5432:5432"
environment: environment:
@ -81,7 +61,7 @@ services:
mariadb: mariadb:
build: ./mariadb build: ./mariadb
volumes_from: volumes_from:
- data - volumes_data
ports: ports:
- "3306:3306" - "3306:3306"
environment: environment:
@ -100,7 +80,7 @@ services:
environment: environment:
- NEO4J_AUTH=homestead:secret - NEO4J_AUTH=homestead:secret
volumes_from: volumes_from:
- data - volumes_data
### MongoDB Container ####################################### ### MongoDB Container #######################################
@ -109,14 +89,14 @@ services:
ports: ports:
- "27017:27017" - "27017:27017"
volumes_from: volumes_from:
- data - volumes_data
### Redis Container ######################################### ### Redis Container #########################################
redis: redis:
build: ./redis build: ./redis
volumes_from: volumes_from:
- data - volumes_data
ports: ports:
- "6379:6379" - "6379:6379"
@ -125,7 +105,7 @@ services:
memcached: memcached:
build: ./memcached build: ./memcached
volumes_from: volumes_from:
- data - volumes_data
ports: ports:
- "11211:11211" - "11211:11211"
links: links:
@ -156,9 +136,29 @@ services:
build: build:
context: ./workspace context: ./workspace
args: args:
INSTALL_PRESTISSIMO: ${INSTALL_PRESTISSIMO} - INSTALL_PRESTISSIMO=false
volumes_from: volumes_from:
- application - volumes_source
tty: true tty: true
### Laravel Application Code Container ######################
volumes_source:
build: ./volumes/application
volumes:
- ../:/var/www/laravel
### Databases Data Container ################################
volumes_data:
build: ./volumes/data
volumes:
- /var/lib/mysql:/var/lib/mysql
- /var/lib/postgres:/var/lib/postgres
- /var/lib/mariadb:/var/lib/mariadb
- /var/lib/memcached:/var/lib/memcached
- /var/lib/redis:/data
- /var/lib/neo4j:/var/lib/neo4j/data
- /var/lib/mongo:/data/db
### Add more Containers below ############################### ### Add more Containers below ###############################

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,6 +9,7 @@ RUN apt-get update && apt-get install -y \
libpq-dev \ libpq-dev \
libmemcached-dev \ libmemcached-dev \
curl \ curl \
libjpeg-dev \
libpng12-dev \ libpng12-dev \
libfreetype6-dev \ libfreetype6-dev \
libssl-dev \ libssl-dev \
@ -25,6 +26,7 @@ RUN pecl install mongodb
# configure gd library # configure gd library
RUN docker-php-ext-configure gd \ RUN docker-php-ext-configure gd \
--enable-gd-native-ttf \ --enable-gd-native-ttf \
--with-jpeg-dir=/usr/lib \
--with-freetype-dir=/usr/include/freetype2 --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

View File

@ -9,6 +9,7 @@ RUN apt-get update && apt-get install -y \
libpq-dev \ libpq-dev \
libmemcached-dev \ libmemcached-dev \
curl \ curl \
libjpeg-dev \
libpng12-dev \ libpng12-dev \
libfreetype6-dev \ libfreetype6-dev \
libssl-dev \ libssl-dev \
@ -25,6 +26,7 @@ RUN pecl install mongodb
# configure gd library # configure gd library
RUN docker-php-ext-configure gd \ RUN docker-php-ext-configure gd \
--enable-gd-native-ttf \ --enable-gd-native-ttf \
--with-jpeg-dir=/usr/lib \
--with-freetype-dir=/usr/include/freetype2 --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

View File

@ -9,6 +9,7 @@ RUN apt-get update && apt-get install -y \
libpq-dev \ libpq-dev \
libmemcached-dev \ libmemcached-dev \
curl \ curl \
libjpeg-dev \
libpng12-dev \ libpng12-dev \
libfreetype6-dev \ libfreetype6-dev \
libssl-dev \ libssl-dev \
@ -25,6 +26,7 @@ RUN pecl install mongodb
# configure gd library # configure gd library
RUN docker-php-ext-configure gd \ RUN docker-php-ext-configure gd \
--enable-gd-native-ttf \ --enable-gd-native-ttf \
--with-jpeg-dir=/usr/lib \
--with-freetype-dir=/usr/include/freetype2 --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

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