Skip to content

Commit a303995

Browse files
committed
Fix conflicts
2 parents b01bae5 + 041d134 commit a303995

18 files changed

Lines changed: 1246 additions & 56 deletions
File renamed without changes.

README-zh.md

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

README.md

Lines changed: 48 additions & 13 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,8 +129,10 @@ 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...)
135+
- phpMyAdmin
129136

130137

131138
>If you can't find your Software, build it yourself and add it to this list. Contributions are welcomed :)
@@ -187,8 +194,8 @@ What's better than a **Demo Video**:
187194
<a name="Requirements"></a>
188195
## Requirements
189196

190-
- [Git](https://git-scm.com/downloads)
191-
- [Docker](https://www.docker.com/products/docker/)
197+
- [Git](https://git-scm.com/downloads)
198+
- [Docker](https://www.docker.com/products/docker/) `>= 1.12`
192199

193200

194201

@@ -243,7 +250,7 @@ docker-compose up -d nginx mysql
243250

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

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

248255

249256
**Note**: `workspace` and `php-fpm` will run automatically in most of the cases, so no need to specify them in the `up` command.
@@ -492,7 +499,7 @@ Example using Composer
492499
composer create-project laravel/laravel my-cool-app "5.2.*"
493500
```
494501

495-
> We recommand using `composer create-project` instead of the Laravel installer, to install Laravel.
502+
> We recommend using `composer create-project` instead of the Laravel installer, to install Laravel.
496503

497504
For more about the Laravel installation click [here](https://laravel.com/docs/master#installing-laravel).
498505

@@ -701,6 +708,26 @@ More details about this [here](https://github.com/jenssegers/laravel-mongodb#ins
701708

702709

703710

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+
704731
<br>
705732
<a name="PHP"></a>
706733

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

868895

869896

870-
871-
872-
873-
874-
875-
876-
877897
<br>
878898
<a name="Misc"></a>
879899

@@ -983,6 +1003,8 @@ It should be like this:
9831003

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

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

9881010
Run the following command from the Laravel root directory:
@@ -991,16 +1013,27 @@ Run the following command from the Laravel root directory:
9911013
sudo chmod -R 777 storage bootstrap/cache
9921014
```
9931015

1016+
9941017
#### I see "Welcome to nginx" instead of the Laravel App!
9951018

9961019
Use `http://127.0.0.1` instead of `http://localhost` in your browser.
9971020

1021+
1022+
9981023
#### I see an error message containing `address already in use`
9991024

10001025
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.
10011026

10021027

10031028

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+
10041037

10051038

10061039

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

10321065
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 :)
10331066

1034-
#### 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).
10351068

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

10511084
**Main Contributors:**
10521085

1086+
- [Zhqagp](https://github.com/zhqagp)
1087+
- [Tim B (tjb328)](https://github.com/tjb328)
10531088
- [MidasCodeBreaker](https://github.com/midascodebreaker)
10541089
- [Larry Eitel (LarryEitel)](https://github.com/LarryEitel)
10551090
- [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: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@ services:
1414
- INSTALL_DRUSH=false
1515
- INSTALL_AEROSPIKE_EXTENSION=false
1616
- COMPOSER_GLOBAL_INSTALL=false
17+
- INSTALL_WORKSPACE_SSH=false
1718
- PUID=1000
1819
- PGID=1000
20+
- NODE_VERSION=stable
1921
volumes_from:
2022
- volumes_source
2123
extra_hosts:
2224
# IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
2325
- "dockerhost:10.0.75.1"
26+
ports:
27+
- "22:22"
2428
tty: true
2529

2630
### PHP-FPM Container #######################################
@@ -45,6 +49,8 @@ services:
4549
extra_hosts:
4650
# IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
4751
- "dockerhost:10.0.75.1"
52+
ports:
53+
- "22:22"
4854
environment:
4955
# IMPORTANT: Set the Remote Interpreter entry matching name to `laravel`
5056
- PHP_IDE_CONFIG="serverName=laravel"
@@ -200,6 +206,21 @@ services:
200206
links:
201207
- php-fpm
202208

209+
### RabbitMQ Container ####################################
210+
211+
rabbitmq:
212+
build: ./rabbitmq
213+
ports:
214+
- "5672:5672"
215+
- "15671:15671"
216+
- "8080:15672"
217+
privileged: true
218+
environment:
219+
RABBITMQ_DEFAULT_USER: guest
220+
RABBITMQ_DEFAULT_PASS: guest
221+
links:
222+
- php-fpm
223+
203224
### Beanstalkd Console Container ############################
204225

205226
beanstalkd-console:
@@ -221,13 +242,33 @@ services:
221242
- "2015:2015"
222243
volumes:
223244
- ./caddy/Caddyfile:/etc/Caddyfile
245+
- ./logs/caddy:/var/log/caddy
224246
links:
225247
- php-fpm
226248

249+
### phpMyAdmin Container ##################################
250+
251+
phpmyadmin:
252+
build: ./phpmyadmin
253+
environment:
254+
PMA_ARBITRARY: 1
255+
MYSQL_USER: homestead
256+
MYSQL_PASSWORD: secret
257+
MYSQL_ROOT_PASSWORD: root
258+
volumes_from:
259+
- volumes_data
260+
ports:
261+
- "8080:80"
262+
links:
263+
# for mysql container
264+
- "mysql:db"
265+
# for mariadb container
266+
# - "mariadb:db"
267+
227268
### Laravel Application Code Container ######################
228269

229270
volumes_source:
230-
build: ./volumes/application
271+
image: tianon/true
231272
volumes:
232273
- ../:/var/www/laravel
233274
# Demonstration of how to mount multiple sites
@@ -237,15 +278,15 @@ services:
237278
### Databases Data Container ################################
238279

239280
volumes_data:
240-
build: ./volumes/data
281+
image: tianon/true
241282
volumes:
242283
- ./data/mysql:/var/lib/mysql
243284
- ./data/postgres:/var/lib/postgres
244-
- ./data/mariadb:/var/lib/mariadb
245285
- ./data/memcached:/var/lib/memcached
246286
- ./data/redis:/data
247287
- ./data/neo4j:/var/lib/neo4j/data
248288
- ./data/mongo:/data/db
249289
- ./data/aerospike:/opt/aerospike/data
290+
- ./data/sessions:/sessions
250291

251292
### Add more Containers below ###############################

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" \
@@ -124,7 +120,6 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
124120
# Opcache:
125121
#####################################
126122
ARG INSTALL_OPCACHE=true
127-
ENV INSTALL_OPCACHE ${INSTALL_OPCACHE}
128123
RUN if [ ${INSTALL_OPCACHE} = true ]; then \
129124
docker-php-ext-install opcache && \
130125
docker-php-ext-enable opcache \

0 commit comments

Comments
 (0)