Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
2df00ecdad | |||
aeb5a6bb63 | |||
2bbf59ddda | |||
dca0545293 | |||
5f99478c76 | |||
48a53f1d24 | |||
11cdfd440b | |||
14cbe9f935 | |||
42d63236f1 | |||
d01d087431 | |||
11c65c4a00 | |||
1b9630e8a1 | |||
3a714339da |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
/logs
|
/logs
|
||||||
|
/data
|
||||||
.env
|
.env
|
26
README.md
26
README.md
@ -49,6 +49,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)
|
||||||
|
|
||||||
@ -127,7 +128,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).
|
||||||
|
|
||||||
@ -259,6 +260,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 +824,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 +877,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)
|
||||||
|
@ -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:
|
||||||
|
- ./data/mysql:/var/lib/mysql
|
||||||
|
- ./data/postgres:/var/lib/postgres
|
||||||
|
- ./data/mariadb:/var/lib/mariadb
|
||||||
|
- ./data/memcached:/var/lib/memcached
|
||||||
|
- ./data/redis:/data
|
||||||
|
- ./data/neo4j:/var/lib/neo4j/data
|
||||||
|
- ./data/mongo:/data/db
|
||||||
|
|
||||||
### Add more Containers below ###############################
|
### Add more Containers below ###############################
|
||||||
|
@ -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
|
||||||
|
Reference in New Issue
Block a user