Skip to content

Commit 041d134

Browse files
authored
Merge pull request laradock#7 from LaraDock/master
Just update the fork
2 parents 58af86a + 79ff092 commit 041d134

16 files changed

Lines changed: 1139 additions & 55 deletions

File tree

File renamed without changes.

README-zh.md

Lines changed: 983 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ It's like Laravel Homestead but for Docker instead of Vagrant.
1313

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

16+
17+
1618
<br>
1719
## Contents
1820

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

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

194200

195201

@@ -244,7 +250,7 @@ docker-compose up -d nginx mysql
244250

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

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

249255

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

703709

704710

711+
<br>
712+
<a name="Use-phpMyAdmin"></a>
713+
### Use phpMyAdmin
714+
715+
1 - Run the phpMyAdmin Container (`phpmyadmin`) with the `docker-compose up` command. Example:
716+
717+
```bash
718+
# use with mysql
719+
docker-compose up -d mysql phpmyadmin
720+
721+
# use with mariadb
722+
docker-compose up -d mariadb phpmyadmin
723+
```
724+
725+
2 - Open your browser and visit the localhost on port **8080**: `http://localhost:8080`
726+
727+
728+
729+
730+
705731
<br>
706732
<a name="PHP"></a>
707733

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

869895

870896

871-
872-
873-
874-
875-
876-
877-
878897
<br>
879898
<a name="Misc"></a>
880899

@@ -984,6 +1003,8 @@ It should be like this:
9841003

9851004
*Here's a list of the common problems you might face, and the possible solutions.*
9861005

1006+
1007+
9871008
#### I see a blank (white) page instead of the Laravel 'Welcome' page!
9881009

9891010
Run the following command from the Laravel root directory:
@@ -992,16 +1013,27 @@ Run the following command from the Laravel root directory:
9921013
sudo chmod -R 777 storage bootstrap/cache
9931014
```
9941015

1016+
9951017
#### I see "Welcome to nginx" instead of the Laravel App!
9961018

9971019
Use `http://127.0.0.1` instead of `http://localhost` in your browser.
9981020

1021+
1022+
9991023
#### I see an error message containing `address already in use`
10001024

10011025
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.
10021026

10031027

10041028

1029+
#### I get Nginx error 404 Not Found on Windows.
1030+
1031+
1. Go to docker Settings on your Windows machine.
1032+
2. Click on the `Shared Drives` tab and check the drive that contains your project files.
1033+
3. Enter your windows username and password.
1034+
4. Go to the `reset` tab and click restart docker.
1035+
1036+
10051037

10061038

10071039

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

10331065
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 :)
10341066

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

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

10521084
**Main Contributors:**
10531085

1086+
- [Zhqagp](https://github.com/zhqagp)
1087+
- [Tim B (tjb328)](https://github.com/tjb328)
10541088
- [MidasCodeBreaker](https://github.com/midascodebreaker)
10551089
- [Larry Eitel (LarryEitel)](https://github.com/LarryEitel)
10561090
- [Suteepat (tianissimo)](https://github.com/tianissimo)

_guides/digital_ocean.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ $root@midascode:~# docker
3232
$root@midascode:~# apt-get install git
3333
$root@midascode:~# git clone https://github.com/laravel/laravel
3434
$root@midascode:~# cd laravel
35-
$root@midascode:~/laravel# git checkout develop
3635
$root@midascode:~/laravel/ git submodule add https://github.com/LaraDock/laradock.git
3736
$root@midascode:~/laravel/ cd laradock
3837
```

caddy/Caddyfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ rewrite {
99
ext /
1010
to /index.php?{query}
1111
}
12+
gzip
1213
browse
13-
log stdout
14-
errors stderr
14+
log /var/log/caddy/access.log
15+
errors /var/log/caddy/error.log
1516
# Uncomment to enable TLS (HTTPS)
1617
# Change the first list to listen on port 443 when enabling TLS
1718
#tls self_signed

caddy/Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,23 @@ FROM alpine:3.4
22

33
MAINTAINER Eric Pfeiffer <computerfr33k@users.noreply.github.com>
44

5-
LABEL caddy_version="0.9.0" architecture="amd64"
5+
ENV caddy_version=0.9.1
6+
7+
LABEL caddy_version="$caddy_version" architecture="amd64"
68

79
RUN apk update \
810
&& apk upgrade \
911
&& apk add tar curl
1012

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

1920
EXPOSE 80 443 2015
2021

2122
WORKDIR /var/www/laravel/public
2223

23-
ENTRYPOINT ["caddy"]
24-
25-
CMD ["-conf", "/etc/Caddyfile"]
24+
CMD ["/usr/bin/caddy", "-conf", "/etc/Caddyfile"]

docker-compose.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ services:
1616
- INSTALL_WORKSPACE_SSH=false
1717
- PUID=1000
1818
- PGID=1000
19+
- NODE_VERSION=stable
1920
volumes_from:
2021
- volumes_source
2122
extra_hosts:
2223
# IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
2324
- "dockerhost:10.0.75.1"
25+
ports:
26+
- "22:22"
2427
tty: true
2528

2629
### PHP-FPM Container #######################################
@@ -44,6 +47,8 @@ services:
4447
extra_hosts:
4548
# IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
4649
- "dockerhost:10.0.75.1"
50+
ports:
51+
- "22:22"
4752
environment:
4853
# IMPORTANT: Set the Remote Interpreter entry matching name to `laravel`
4954
- PHP_IDE_CONFIG="serverName=laravel"
@@ -185,6 +190,21 @@ services:
185190
links:
186191
- php-fpm
187192

193+
### RabbitMQ Container ####################################
194+
195+
rabbitmq:
196+
build: ./rabbitmq
197+
ports:
198+
- "5672:5672"
199+
- "15671:15671"
200+
- "8080:15672"
201+
privileged: true
202+
environment:
203+
RABBITMQ_DEFAULT_USER: guest
204+
RABBITMQ_DEFAULT_PASS: guest
205+
links:
206+
- php-fpm
207+
188208
### Beanstalkd Console Container ############################
189209

190210
beanstalkd-console:
@@ -206,6 +226,7 @@ services:
206226
- "2015:2015"
207227
volumes:
208228
- ./caddy/Caddyfile:/etc/Caddyfile
229+
- ./logs/caddy:/var/log/caddy
209230
links:
210231
- php-fpm
211232

@@ -231,7 +252,7 @@ services:
231252
### Laravel Application Code Container ######################
232253

233254
volumes_source:
234-
build: ./volumes/application
255+
image: tianon/true
235256
volumes:
236257
- ../:/var/www/laravel
237258
# Demonstration of how to mount multiple sites
@@ -241,7 +262,7 @@ services:
241262
### Databases Data Container ################################
242263

243264
volumes_data:
244-
build: ./volumes/data
265+
image: tianon/true
245266
volumes:
246267
- ./data/mysql:/var/lib/mysql
247268
- ./data/postgres:/var/lib/postgres

php-fpm/Dockerfile-56

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
4141
#####################################
4242

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

5857
ARG INSTALL_MONGO=true
59-
ENV INSTALL_MONGO ${INSTALL_MONGO}
6058
RUN if [ ${INSTALL_MONGO} = true ]; then \
6159
# Install the mongodb extension
6260
pecl install mongodb && \
@@ -68,7 +66,6 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
6866
#####################################
6967

7068
ARG INSTALL_ZIP_ARCHIVE=true
71-
ENV INSTALL_ZIP_ARCHIVE ${INSTALL_ZIP_ARCHIVE}
7269
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
7370
# Install the zip extension
7471
pecl install zip && \
@@ -80,7 +77,6 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
8077
#####################################
8178

8279
ARG INSTALL_MEMCACHED=true
83-
ENV INSTALL_MEMCACHED ${INSTALL_MEMCACHED}
8480
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
8581
# Install the php memcached extension
8682
pecl install memcached && \
@@ -91,7 +87,6 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
9187
# Opcache:
9288
#####################################
9389
ARG INSTALL_OPCACHE=true
94-
ENV INSTALL_OPCACHE ${INSTALL_OPCACHE}
9590
RUN if [ ${INSTALL_OPCACHE} = true ]; then \
9691
docker-php-ext-install opcache && \
9792
docker-php-ext-enable opcache \

php-fpm/Dockerfile-70

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
4141
#####################################
4242

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

5857
ARG INSTALL_MONGO=true
59-
ENV INSTALL_MONGO ${INSTALL_MONGO}
6058
RUN if [ ${INSTALL_MONGO} = true ]; then \
6159
# Install the mongodb extension
6260
pecl install mongodb && \
@@ -68,7 +66,6 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
6866
#####################################
6967

7068
ARG INSTALL_ZIP_ARCHIVE=true
71-
ENV INSTALL_ZIP_ARCHIVE ${INSTALL_ZIP_ARCHIVE}
7269
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
7370
# Install the zip extension
7471
pecl install zip && \
@@ -80,7 +77,6 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
8077
#####################################
8178

8279
ARG INSTALL_MEMCACHED=true
83-
ENV INSTALL_MEMCACHED ${INSTALL_MEMCACHED}
8480
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
8581
# Install the php memcached extension
8682
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz" \
@@ -102,7 +98,6 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
10298
# Opcache:
10399
#####################################
104100
ARG INSTALL_OPCACHE=true
105-
ENV INSTALL_OPCACHE ${INSTALL_OPCACHE}
106101
RUN if [ ${INSTALL_OPCACHE} = true ]; then \
107102
docker-php-ext-install opcache && \
108103
docker-php-ext-enable opcache \

phpmyadmin/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,3 @@ VOLUME /sessions
77

88
# We expose phpMyAdmin on port 80
99
EXPOSE 80
10-
11-
ENTRYPOINT [ "/run.sh" ]

0 commit comments

Comments
 (0)