Merge pull request #139 from Kauhat/master
Database volume mapping changes & documentation
This commit is contained in:
commit
2bbf59ddda
|
@ -1,2 +1,3 @@
|
|||
/logs
|
||||
/data
|
||||
.env
|
24
README.md
24
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)
|
||||
- [Find your Docker IP Address](#Find-Docker-IP-Address)
|
||||
- [Use custom Domain](#Use-custom-Domain)
|
||||
- [Optional Features](#Optional-Features)
|
||||
- [Debugging](#debugging)
|
||||
- [Help & Questions](#Help)
|
||||
|
||||
|
@ -822,30 +823,35 @@ server_name laravel.dev;
|
|||
```
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Optional-Features"></a>
|
||||
### Optional Features
|
||||
Optional features can be enabled by changing the `.env` file in the Laradock directory.
|
||||
|
||||
#### 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 `.env` file.
|
||||
|
||||
<br>
|
||||
<a name="debugging"></a>
|
||||
### Debugging
|
||||
|
||||
*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
|
||||
sudo chmod -R 777 storage bootstrap/cache
|
||||
```
|
||||
|
||||
#### + I see "Welcome to nginx" instead of the Laravel App!
|
||||
|
||||
use `http://127.0.0.1` instead of `http://localhost` in your browser.
|
||||
|
||||
|
||||
|
||||
|
||||
#### I see "Welcome to nginx" instead of the Laravel App!
|
||||
|
||||
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>
|
||||
|
|
|
@ -2,45 +2,32 @@ version: '2'
|
|||
|
||||
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_source:
|
||||
build: ./volumes/application
|
||||
volumes:
|
||||
- ../:/var/www/laravel
|
||||
|
||||
### Databases Data Container ################################
|
||||
|
||||
data:
|
||||
build: ./data
|
||||
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
|
||||
- ./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
|
||||
|
||||
### Nginx Server Container ##################################
|
||||
|
||||
nginx:
|
||||
build: ./nginx
|
||||
volumes_from:
|
||||
- application
|
||||
- volumes_source
|
||||
volumes:
|
||||
- ./logs/nginx/:/var/log/nginx
|
||||
ports:
|
||||
|
@ -49,12 +36,25 @@ services:
|
|||
links:
|
||||
- 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:
|
||||
build: ./mysql
|
||||
volumes_from:
|
||||
- data
|
||||
- volumes_data
|
||||
ports:
|
||||
- "3306:3306"
|
||||
environment:
|
||||
|
@ -68,7 +68,7 @@ services:
|
|||
postgres:
|
||||
build: ./postgres
|
||||
volumes_from:
|
||||
- data
|
||||
- volumes_data
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
|
@ -81,7 +81,7 @@ services:
|
|||
mariadb:
|
||||
build: ./mariadb
|
||||
volumes_from:
|
||||
- data
|
||||
- volumes_data
|
||||
ports:
|
||||
- "3306:3306"
|
||||
environment:
|
||||
|
@ -100,7 +100,7 @@ services:
|
|||
environment:
|
||||
- NEO4J_AUTH=homestead:secret
|
||||
volumes_from:
|
||||
- data
|
||||
- volumes_data
|
||||
|
||||
### MongoDB Container #######################################
|
||||
|
||||
|
@ -109,14 +109,14 @@ services:
|
|||
ports:
|
||||
- "27017:27017"
|
||||
volumes_from:
|
||||
- data
|
||||
- volumes_data
|
||||
|
||||
### Redis Container #########################################
|
||||
|
||||
redis:
|
||||
build: ./redis
|
||||
volumes_from:
|
||||
- data
|
||||
- volumes_data
|
||||
ports:
|
||||
- "6379:6379"
|
||||
|
||||
|
@ -125,7 +125,7 @@ services:
|
|||
memcached:
|
||||
build: ./memcached
|
||||
volumes_from:
|
||||
- data
|
||||
- volumes_data
|
||||
ports:
|
||||
- "11211:11211"
|
||||
links:
|
||||
|
@ -156,9 +156,9 @@ services:
|
|||
build:
|
||||
context: ./workspace
|
||||
args:
|
||||
INSTALL_PRESTISSIMO: ${INSTALL_PRESTISSIMO}
|
||||
- INSTALL_PRESTISSIMO=${INSTALL_PRESTISSIMO}
|
||||
volumes_from:
|
||||
- application
|
||||
- volumes_source
|
||||
tty: true
|
||||
|
||||
### Add more Containers below ###############################
|
||||
|
|
Loading…
Reference in New Issue