Compare commits

...

9 Commits

Author SHA1 Message Date
adaaa25f47 remove the Laravel installer from the workspace container 2016-05-23 23:32:59 +03:00
11a13a0c33 Merge pull request #66 from AminMkh/workspace-postgres-driver
added postgres driver
2016-05-23 23:24:27 +03:00
c642560993 added postgres driver
added postgres driver to workspace container.
2016-05-23 23:20:07 +03:00
ea9f5c635f Merge pull request #64 from AminMkh/master
Update docker-compose.yml
2016-05-23 23:00:09 +03:00
fd4253afb6 Update docker-compose.yml 2016-05-23 22:23:10 +03:00
73310e45e8 Merge pull request #62 from AminMkh/master
Update README.MD
2016-05-23 21:53:55 +03:00
7f91fc9798 Update README.MD 2016-05-23 21:45:38 +03:00
a8a7685a40 basic changes to the readme format 2016-05-21 19:19:03 +03:00
06c4c19a6f replace official neo4j image with tpires/neo4j
because of this wired error
(https://github.com/neo4j/docker-neo4j/issues/33)
2016-05-20 21:21:19 +03:00
4 changed files with 37 additions and 53 deletions

View File

@ -246,7 +246,7 @@ DB_HOST=xxx.xxx.xxx.xxx
**Debugging**: in case you faced an error here, run this command from the Laravel root directory: **Debugging**: in case you faced an error here, run this command from the Laravel root directory:
```bash ```bash
sudo chmod -R 777 storage && sudo chmod -R 777 bootstrap/cache sudo chmod -R 777 storage bootstrap/cache
``` ```
<br> <br>
@ -260,12 +260,12 @@ If you have any problem, or need a special support. Feel free to contact me, mor
<a name="Docker"></a> <a name="Docker"></a>
### Docker ### [Docker]
<a name="List-current-running-Containers"></a> <a name="List-current-running-Containers"></a>
#### List current running Containers ### List current running Containers
```bash ```bash
docker ps docker ps
``` ```
@ -281,7 +281,7 @@ docker-compose ps
<br> <br>
<a name="Close-all-running-Containers"></a> <a name="Close-all-running-Containers"></a>
#### Close all running Containers ### Close all running Containers
```bash ```bash
docker-compose stop docker-compose stop
``` ```
@ -299,7 +299,7 @@ docker-compose stop {container-name}
<br> <br>
<a name="Delete-all-existing-Containers"></a> <a name="Delete-all-existing-Containers"></a>
#### Delete all existing Containers ### Delete all existing Containers
```bash ```bash
docker-compose down docker-compose down
``` ```
@ -314,7 +314,7 @@ docker-compose down
<br> <br>
<a name="Enter-Container"></a> <a name="Enter-Container"></a>
#### Enter a Container (SSH into a running Container) ### Enter a Container (SSH into a running Container)
1 - first list the current running containers with `docker ps` 1 - first list the current running containers with `docker ps`
@ -333,7 +333,7 @@ docker exec -it {container-name} bash
<br> <br>
<a name="Edit-Container"></a> <a name="Edit-Container"></a>
#### 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:
@ -361,7 +361,7 @@ Change Redis defaut port to 1111:
<br> <br>
<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>
@ -388,7 +388,7 @@ docker-compose build mysql
<br> <br>
<a name="Build-Re-build-Containers"></a> <a name="Build-Re-build-Containers"></a>
#### Build/Re-build Containers ### Build/Re-build Containers
If you do any change to any `dockerfile` make sure you run this command, for the changes to take effect: If you do any change to any `dockerfile` make sure you run this command, for the changes to take effect:
@ -408,7 +408,7 @@ docker-compose build {container-name}
<br> <br>
<a name="Add-Docker-Images"></a> <a name="Add-Docker-Images"></a>
#### Add more Software's (Docker Images) ### Add more Software's (Docker Images)
To add an image (software), just edit the `docker-compose.yml` and add your container details, to do so you need to be familiar with the [docker compose file syntax](https://docs.docker.com/compose/compose-file/). To add an image (software), just edit the `docker-compose.yml` and add your container details, to do so you need to be familiar with the [docker compose file syntax](https://docs.docker.com/compose/compose-file/).
@ -422,7 +422,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:
@ -437,31 +437,27 @@ docker logs {container-name}
<br> <br>
<a name="Laravel"></a> <a name="Laravel"></a>
### Laravel ### [Laravel]
<a name="Install-Laravel"></a> <a name="Install-Laravel"></a>
## Install Laravel from a Docker Container ### Install Laravel from a Docker Container
1 - First you need to enter the Workspace Container. 1 - First you need to enter the Workspace Container.
2 - Install Laravel anyway you like. 2 - Install Laravel.
Example using the Laravel Installer:
```bash
laravel new my-cool-app
```
Example using Composer Example using Composer
```bash ```bash
composer create-project laravel/laravel my-cool-app "5.1.*" composer create-project laravel/laravel my-cool-app "5.2.*"
``` ```
For more about this check out this [link](https://laravel.com/docs/master#installing-laravel). > We recommand using `composer create-project` instead of the Laravel installer, to install Laravel.
For more about the Laravel installation click [here](https://laravel.com/docs/master#installing-laravel).
3 - Edit `docker-compose.yml` to Map the new application path: 3 - Edit `docker-compose.yml` to Map the new application path:
@ -484,8 +480,9 @@ cd my-cool-app
<br>
<a name="Run-Artisan-Commands"></a> <a name="Run-Artisan-Commands"></a>
#### Run Artisan Commands ### Run Artisan Commands
You can run artisan commands and many other Terminal commands from the Workspace container. You can run artisan commands and many other Terminal commands from the Workspace container.
@ -531,7 +528,7 @@ laravel new blog
<br> <br>
<a name="Use-Redis"></a> <a name="Use-Redis"></a>
#### Use Redis ### Use Redis
1 - First make sure you run the Redis Container with the `docker-compose` command. 1 - First make sure you run the Redis Container with the `docker-compose` command.
@ -584,7 +581,7 @@ composer require predis/predis:^1.0
<br> <br>
<a name="PHP"></a> <a name="PHP"></a>
### PHP ### [PHP]
@ -592,7 +589,7 @@ composer require predis/predis:^1.0
<a name="Install-PHP-Extensions"></a> <a name="Install-PHP-Extensions"></a>
#### Install PHP Extensions ### Install PHP Extensions
Before installing PHP extensions, you have to decide whether you need for the `FPM` or `CLI` because each lives on a different container, if you need it for both you have to edit both containers. Before installing PHP extensions, you have to decide whether you need for the `FPM` or `CLI` because each lives on a different container, if you need it for both you have to edit both containers.
@ -610,7 +607,7 @@ The PHP-CLI extensions should be installed in `workspace/Dockerfile`.
<br> <br>
<a name="Change-the-PHP-FPM-Version"></a> <a name="Change-the-PHP-FPM-Version"></a>
#### Change the PHP-FPM Version ### Change the PHP-FPM Version
By default **PHP-FPM 7.0** is running. By default **PHP-FPM 7.0** is running.
>The PHP-FPM is responsible of serving your application code, you don't have to change the PHP-CLI version if you are planing to run your application on different PHP-FPM version. >The PHP-FPM is responsible of serving your application code, you don't have to change the PHP-CLI version if you are planing to run your application on different PHP-FPM version.
@ -657,7 +654,7 @@ For more details about the PHP base image, visit the [official PHP docker images
<br> <br>
<a name="Change-the-PHP-CLI-Version"></a> <a name="Change-the-PHP-CLI-Version"></a>
#### Change the PHP-CLI Version ### Change the PHP-CLI Version
By default **PHP-CLI 7.0** is running. By default **PHP-CLI 7.0** is running.
>Note: it's not very essential to edit the PHP-CLI verion. The PHP-CLI is only used for the Artisan Commands & Composer. It doesn't serve your Application code, this is the PHP-FPM job. >Note: it's not very essential to edit the PHP-CLI verion. The PHP-CLI is only used for the Artisan Commands & Composer. It doesn't serve your Application code, this is the PHP-FPM job.
@ -678,14 +675,14 @@ Right now you have to manually edit the `Dockerfile` or create a new one like it
<br> <br>
<a name="Misc"></a> <a name="Misc"></a>
### Misc ### [Misc]
<a name="Run-Docker-Virtual-Host"></a> <a name="Run-Docker-Virtual-Host"></a>
#### Run a Docker Virtual Host ### Run a Docker Virtual Host
These steps are only for **Windows & MAC** users *(Linux users don't need a virtual host)*: These steps are only for **Windows & MAC** users *(Linux users don't need a virtual host)*:
@ -715,7 +712,7 @@ 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:**
@ -755,7 +752,7 @@ docker0 Link encap:Ethernet HWaddr 02:42:41:2d:c4:24
<br> <br>
<a name="Use-custom-Domain"></a> <a name="Use-custom-Domain"></a>
#### Use custom Domain (instead of the Docker IP) ### Use custom Domain (instead of the Docker IP)
Assuming your custom domain is `laravel.dev` and your current `Docker-IP` is `xxx.xxx.xxx.xxx`. Assuming your custom domain is `laravel.dev` and your current `Docker-IP` is `xxx.xxx.xxx.xxx`.

View File

@ -32,7 +32,7 @@ services:
- /var/lib/mariadb - /var/lib/mariadb
- /var/lib/redis - /var/lib/redis
- /var/lib/memcached - /var/lib/memcached
- /var/lib/neo4j - /var/lib/neo4j/data
### Nginx Server Container ################################## ### Nginx Server Container ##################################
@ -61,8 +61,6 @@ services:
MYSQL_USER: homestead MYSQL_USER: homestead
MYSQL_PASSWORD: secret MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: root MYSQL_ROOT_PASSWORD: root
links:
- php-fpm
### PostgreSQL Container #################################### ### PostgreSQL Container ####################################
@ -76,8 +74,6 @@ services:
POSTGRES_DB: homestead POSTGRES_DB: homestead
POSTGRES_USER: homestead POSTGRES_USER: homestead
POSTGRES_PASSWORD: secret POSTGRES_PASSWORD: secret
links:
- php-fpm
### MariaDB Container ####################################### ### MariaDB Container #######################################
@ -92,8 +88,6 @@ services:
MYSQL_USER: homestead MYSQL_USER: homestead
MYSQL_PASSWORD: secret MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: root MYSQL_ROOT_PASSWORD: root
links:
- php-fpm
### Neo4j Container ######################################### ### Neo4j Container #########################################
@ -101,11 +95,11 @@ services:
build: ./neo4j build: ./neo4j
ports: ports:
- "7474:7474" - "7474:7474"
- "7687:7687" - "1337:1337"
environment:
- NEO4J_AUTH=homestead:secret
volumes_from: volumes_from:
- data - data
links:
- php-fpm
### Redis Container ######################################### ### Redis Container #########################################
@ -115,8 +109,6 @@ services:
- data - data
ports: ports:
- "6379:6379" - "6379:6379"
links:
- php-fpm
### Memcached Container ##################################### ### Memcached Container #####################################

View File

@ -1,9 +1,7 @@
FROM neo4j:3.0 FROM tpires/neo4j
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me> MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
VOLUME /var/lib/neo4j VOLUME /var/lib/neo4j/data
EXPOSE 7474 7687 EXPOSE 7474 1337
CMD ["neo4j"]

View File

@ -29,6 +29,7 @@ RUN apt-get update && apt-get install -y \
php7.0-mbstring \ php7.0-mbstring \
php7.0-mcrypt \ php7.0-mcrypt \
php7.0-mysql \ php7.0-mysql \
php7.0-pgsql \
php7.0-sqlite \ php7.0-sqlite \
php7.0-sqlite3 \ php7.0-sqlite3 \
php7.0-zip \ php7.0-zip \
@ -61,10 +62,6 @@ RUN curl -s http://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/ \ && mv composer.phar /usr/local/bin/ \
&& echo "alias composer='/usr/local/bin/composer.phar'" >> ~/.bashrc && echo "alias composer='/usr/local/bin/composer.phar'" >> ~/.bashrc
# Install the Laravel Installer
RUN composer.phar global require "laravel/installer" \
&& echo "export PATH='~/.composer/vendor/bin:$PATH'" >> ~/.bashrc
# Source the bash # Source the bash
RUN . ~/.bashrc RUN . ~/.bashrc