Skip to content

Commit

Permalink
Merge pull request laradock#7 from LaraDock/master
Browse files Browse the repository at this point in the history
Just update the fork
  • Loading branch information
iamlucianojr authored Sep 1, 2016
2 parents 58af86a + 79ff092 commit 041d134
Show file tree
Hide file tree
Showing 16 changed files with 1,139 additions and 55 deletions.
File renamed without changes.
983 changes: 983 additions & 0 deletions README-zh.md

Large diffs are not rendered by default.

56 changes: 45 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ It's like Laravel Homestead but for Docker instead of Vagrant.

![](https://s31.postimg.org/nbettdki3/lara_dock_poster_new.jpg)



<br>
## Contents


- [Readme Languages](#)
- [English (Default)](#)
- [Chinese](https://github.com/LaraDock/laradock/blob/master/README-zh.md)
- [Intro](#Intro)
- [Features](#features)
- [Supported Software's](#Supported-Containers)
Expand Down Expand Up @@ -44,6 +48,7 @@ It's like Laravel Homestead but for Docker instead of Vagrant.
- [Run Artisan Commands](#Run-Artisan-Commands)
- [Use Redis](#Use-Redis)
- [Use Mongo](#Use-Mongo)
- [Use phpMyAdmin](#Use-phpMyAdmin)
- [PHP](#PHP)
- [Install PHP Extensions](#Install-PHP-Extensions)
- [Change the PHP-FPM Version](#Change-the-PHP-FPM-Version)
Expand Down Expand Up @@ -124,6 +129,7 @@ Let's see how easy it is to install `NGINX`, `PHP`, `Composer`, `MySQL` and `Red
- HHVM
- **Message Queueing Systems:**
- Beanstalkd (+ Beanstalkd Console)
- RabbitMQ (+ RabbitMQ Console)
- **Tools:**
- Workspace (PHP7-CLI, Composer, Git, Node, Gulp, SQLite, Vim, Nano, cURL...)
- phpMyAdmin
Expand Down Expand Up @@ -189,7 +195,7 @@ What's better than a **Demo Video**:
## Requirements

- [Git](https://git-scm.com/downloads)
- [Docker](https://www.docker.com/products/docker/)
- [Docker](https://www.docker.com/products/docker/) `>= 1.12`



Expand Down Expand Up @@ -244,7 +250,7 @@ docker-compose up -d nginx mysql

You can select your own combination of Containers form the list below:

`nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `workspace`, `phpmyadmin`.
`nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `rabbitmq`, `workspace`, `phpmyadmin`.


**Note**: `workspace` and `php-fpm` will run automatically in most of the cases, so no need to specify them in the `up` command.
Expand Down Expand Up @@ -702,6 +708,26 @@ More details about this [here](https://github.com/jenssegers/laravel-mongodb#ins



<br>
<a name="Use-phpMyAdmin"></a>
### Use phpMyAdmin

1 - Run the phpMyAdmin Container (`phpmyadmin`) with the `docker-compose up` command. Example:

```bash
# use with mysql
docker-compose up -d mysql phpmyadmin
# use with mariadb
docker-compose up -d mariadb phpmyadmin
```

2 - Open your browser and visit the localhost on port **8080**: `http://localhost:8080`





<br>
<a name="PHP"></a>

Expand Down Expand Up @@ -868,13 +894,6 @@ To controll the behavior of xDebug (in the `php-fpm` Container), you can run the










<br>
<a name="Misc"></a>

Expand Down Expand Up @@ -984,6 +1003,8 @@ It should be like this:

*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!

Run the following command from the Laravel root directory:
Expand All @@ -992,16 +1013,27 @@ Run the following command from the Laravel root directory:
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 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.



#### I get Nginx error 404 Not Found on Windows.

1. Go to docker Settings on your Windows machine.
2. Click on the `Shared Drives` tab and check the drive that contains your project files.
3. Enter your windows username and password.
4. Go to the `reset` tab and click restart docker.





Expand Down Expand Up @@ -1032,7 +1064,7 @@ Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requ

This little project was built by one man who has a full time job and many responsibilities, so if you like this project and you find that it needs a bug fix or support for new software or upgrade any container, or anything else.. Do not hesitate to contribute, you are more than welcome :)

#### Read our [Contribution Guidelines](https://github.com/LaraDock/laradock/blob/master/_guides/contributing.md)
#### Read the [Contribution Guidelines](https://github.com/LaraDock/laradock/blob/master/CONTRIBUTING.md).

<a name="Help"></a>
## Help & Questions
Expand All @@ -1051,6 +1083,8 @@ For special help with Docker and/or Laravel, you can schedule a live call with t

**Main Contributors:**

- [Zhqagp](https://github.com/zhqagp)
- [Tim B (tjb328)](https://github.com/tjb328)
- [MidasCodeBreaker](https://github.com/midascodebreaker)
- [Larry Eitel (LarryEitel)](https://github.com/LarryEitel)
- [Suteepat (tianissimo)](https://github.com/tianissimo)
Expand Down
1 change: 0 additions & 1 deletion _guides/digital_ocean.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ $root@midascode:~# docker
$root@midascode:~# apt-get install git
$root@midascode:~# git clone https://github.com/laravel/laravel
$root@midascode:~# cd laravel
$root@midascode:~/laravel# git checkout develop
$root@midascode:~/laravel/ git submodule add https://github.com/LaraDock/laradock.git
$root@midascode:~/laravel/ cd laradock
```
Expand Down
5 changes: 3 additions & 2 deletions caddy/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ rewrite {
ext /
to /index.php?{query}
}
gzip
browse
log stdout
errors stderr
log /var/log/caddy/access.log
errors /var/log/caddy/error.log
# Uncomment to enable TLS (HTTPS)
# Change the first list to listen on port 443 when enabling TLS
#tls self_signed
13 changes: 6 additions & 7 deletions caddy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,23 @@ FROM alpine:3.4

MAINTAINER Eric Pfeiffer <[email protected]>

LABEL caddy_version="0.9.0" architecture="amd64"
ENV caddy_version=0.9.1

LABEL caddy_version="$caddy_version" architecture="amd64"

RUN apk update \
&& apk upgrade \
&& apk add tar curl

RUN curl --silent --show-error --fail --location \
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
"https://github.com/mholt/caddy/releases/download/v0.9.0/caddy_linux_amd64.tar.gz" \
"https://github.com/mholt/caddy/releases/download/v$caddy_version/caddy_linux_amd64.tar.gz" \
| tar --no-same-owner -C /usr/bin/ -xz caddy_linux_amd64 \
&& mv /usr/bin/caddy_linux_amd64 /usr/bin/caddy \
&& chmod 0755 /usr/bin/caddy \
&& /usr/bin/caddy -version
&& chmod 0755 /usr/bin/caddy

EXPOSE 80 443 2015

WORKDIR /var/www/laravel/public

ENTRYPOINT ["caddy"]

CMD ["-conf", "/etc/Caddyfile"]
CMD ["/usr/bin/caddy", "-conf", "/etc/Caddyfile"]
25 changes: 23 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ services:
- INSTALL_WORKSPACE_SSH=false
- PUID=1000
- PGID=1000
- NODE_VERSION=stable
volumes_from:
- volumes_source
extra_hosts:
# IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
- "dockerhost:10.0.75.1"
ports:
- "22:22"
tty: true

### PHP-FPM Container #######################################
Expand All @@ -44,6 +47,8 @@ services:
extra_hosts:
# IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
- "dockerhost:10.0.75.1"
ports:
- "22:22"
environment:
# IMPORTANT: Set the Remote Interpreter entry matching name to `laravel`
- PHP_IDE_CONFIG="serverName=laravel"
Expand Down Expand Up @@ -185,6 +190,21 @@ services:
links:
- php-fpm

### RabbitMQ Container ####################################

rabbitmq:
build: ./rabbitmq
ports:
- "5672:5672"
- "15671:15671"
- "8080:15672"
privileged: true
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
links:
- php-fpm

### Beanstalkd Console Container ############################

beanstalkd-console:
Expand All @@ -206,6 +226,7 @@ services:
- "2015:2015"
volumes:
- ./caddy/Caddyfile:/etc/Caddyfile
- ./logs/caddy:/var/log/caddy
links:
- php-fpm

Expand All @@ -231,7 +252,7 @@ services:
### Laravel Application Code Container ######################

volumes_source:
build: ./volumes/application
image: tianon/true
volumes:
- ../:/var/www/laravel
# Demonstration of how to mount multiple sites
Expand All @@ -241,7 +262,7 @@ services:
### Databases Data Container ################################

volumes_data:
build: ./volumes/data
image: tianon/true
volumes:
- ./data/mysql:/var/lib/mysql
- ./data/postgres:/var/lib/postgres
Expand Down
5 changes: 0 additions & 5 deletions php-fpm/Dockerfile-56
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ MAINTAINER Mahmoud Zalt <[email protected]>
#####################################

ARG INSTALL_XDEBUG=true
ENV INSTALL_XDEBUG ${INSTALL_XDEBUG}
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Install the xdebug extension
pecl install xdebug && \
Expand All @@ -56,7 +55,6 @@ COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
#####################################

ARG INSTALL_MONGO=true
ENV INSTALL_MONGO ${INSTALL_MONGO}
RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension
pecl install mongodb && \
Expand All @@ -68,7 +66,6 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
#####################################

ARG INSTALL_ZIP_ARCHIVE=true
ENV INSTALL_ZIP_ARCHIVE ${INSTALL_ZIP_ARCHIVE}
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
# Install the zip extension
pecl install zip && \
Expand All @@ -80,7 +77,6 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
#####################################

ARG INSTALL_MEMCACHED=true
ENV INSTALL_MEMCACHED ${INSTALL_MEMCACHED}
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
# Install the php memcached extension
pecl install memcached && \
Expand All @@ -91,7 +87,6 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
# Opcache:
#####################################
ARG INSTALL_OPCACHE=true
ENV INSTALL_OPCACHE ${INSTALL_OPCACHE}
RUN if [ ${INSTALL_OPCACHE} = true ]; then \
docker-php-ext-install opcache && \
docker-php-ext-enable opcache \
Expand Down
5 changes: 0 additions & 5 deletions php-fpm/Dockerfile-70
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ MAINTAINER Mahmoud Zalt <[email protected]>
#####################################

ARG INSTALL_XDEBUG=true
ENV INSTALL_XDEBUG ${INSTALL_XDEBUG}
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Install the xdebug extension
pecl install xdebug && \
Expand All @@ -56,7 +55,6 @@ COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
#####################################

ARG INSTALL_MONGO=true
ENV INSTALL_MONGO ${INSTALL_MONGO}
RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension
pecl install mongodb && \
Expand All @@ -68,7 +66,6 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
#####################################

ARG INSTALL_ZIP_ARCHIVE=true
ENV INSTALL_ZIP_ARCHIVE ${INSTALL_ZIP_ARCHIVE}
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
# Install the zip extension
pecl install zip && \
Expand All @@ -80,7 +77,6 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
#####################################

ARG INSTALL_MEMCACHED=true
ENV INSTALL_MEMCACHED ${INSTALL_MEMCACHED}
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
# Install the php memcached extension
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz" \
Expand All @@ -102,7 +98,6 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
# Opcache:
#####################################
ARG INSTALL_OPCACHE=true
ENV INSTALL_OPCACHE ${INSTALL_OPCACHE}
RUN if [ ${INSTALL_OPCACHE} = true ]; then \
docker-php-ext-install opcache && \
docker-php-ext-enable opcache \
Expand Down
2 changes: 0 additions & 2 deletions phpmyadmin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ VOLUME /sessions

# We expose phpMyAdmin on port 80
EXPOSE 80

ENTRYPOINT [ "/run.sh" ]
12 changes: 12 additions & 0 deletions rabbitmq/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# RabbitMQ Dockerfile
#
# https://github.com/dockerfile/rabbitmq
#

# Pull base image.
FROM rabbitmq

RUN rabbitmq-plugins enable --offline rabbitmq_management

EXPOSE 15671 15672
7 changes: 0 additions & 7 deletions volumes/application/Dockerfile

This file was deleted.

5 changes: 0 additions & 5 deletions volumes/data/Dockerfile

This file was deleted.

Loading

0 comments on commit 041d134

Please sign in to comment.