Compare commits

...

17 Commits

Author SHA1 Message Date
06353031ac Merge pull request #1466 from fenech/master
Add missing syntax to continue line
2018-04-05 06:53:22 +03:00
1f193a5310 Add missing syntax to continue line 2018-04-04 20:29:14 +02:00
b45bf46436 Merge pull request #1446 from ByZer0/debug-workspace-scheduler
Use xdebug with Laravel scheduler inside workspace container
2018-04-04 17:48:55 +03:00
0586247e3f Merge branch 'master' into debug-workspace-scheduler 2018-04-04 17:48:46 +03:00
0f8891b56c Merge pull request #1464 from danhunsaker/copy-vs-add
Apply COPY vs ADD best practices
2018-04-04 17:36:31 +03:00
ebeb9e43f3 Merge pull request #1458 from larastarscn/master
[feature] support for php worker hot load
2018-04-04 17:35:29 +03:00
52afd9ef62 Merge pull request #1396 from taufek/tj-volume-cached
Use Cached Flag for Application Path Volume
2018-04-04 17:34:20 +03:00
31a4e29c81 Apply COPY vs ADD best practices
Should only use `ADD` for URLs (and even then, `curl` or `wget` are preferred, for numerous reasons, even within this repo) and when extracting archive contents as part of the `ADD` operation; otherwise `COPY` is clearer and (slightly) more efficient.
2018-04-04 06:13:28 -06:00
067218e010 Merge pull request #1461 from Omranic/patch-1
Fix minor typo!
2018-04-02 12:26:34 +08:00
5ed3526e17 Fix minor typo! 2018-04-02 02:53:23 +02:00
54e6d66c83 [feature] support for php worker hot load 2018-03-30 14:30:49 +08:00
8a090f3e46 Merge pull request #1454 from red-smeg/patch-1
Modify the sample config to support symfony 4
2018-03-29 16:19:21 +08:00
1e5d787a7e Merge pull request #1457 from bestlong/fix-elasticsearch
fix #1418 elasticsearch up fails.
2018-03-29 16:18:07 +08:00
83140d9939 fix #1418 elasticsearch up fails. 2018-03-29 15:34:38 +08:00
9b85ac6c2b Modify the sample config to support symfony 4
This allows Laradock to work with symfony 4 projects
2018-03-28 14:46:19 -04:00
245515b41d Use xDebug with Laravel scheduler inside workspace container. 2018-03-22 12:38:42 +03:00
00e43655bd Use Volume Cached Flag for Application Path Volume
Use cached flag to speed up file sync performance.

References:

https://docs.docker.com/docker-for-mac/osxfs-caching/#tuning-with-consistent-cached-and-delegated-configurations

https://blog.docker.com/2017/05/user-guided-caching-in-docker-for-mac/
2018-02-27 00:59:30 +08:00
22 changed files with 53 additions and 47 deletions

View File

@ -176,7 +176,7 @@ docker-compose up -d nginx mysql
**Note**: The `workspace` and `php-fpm` will run automatically in most of the cases, so no need to specify them in the `up` command. If you couldn't find them running then you need specify them as follow: `docker-compose up -d nginx php-fpm mysql workspace`.
You can select your own combination of containers form [this list](http://laradock.io/introduction/#supported-software-images).
You can select your own combination of containers from [this list](http://laradock.io/introduction/#supported-software-images).
*(Please note that sometimes we forget to update the docs, so check the `docker-compose.yml` file to see an updated list of all available containers).*

View File

@ -4,4 +4,4 @@ LABEL maintainer="Luciano Jr <luciano@lucianojr.com.br>"
RUN rm /etc/aerospike/aerospike.conf
ADD aerospike.conf /etc/aerospike/aerospike.conf
COPY aerospike.conf /etc/aerospike/aerospike.conf

View File

@ -6,4 +6,4 @@ services:
applications:
volumes:
- ${APPLICATION}:/var/www
- ${APPLICATION}:/var/www:cached

View File

@ -62,6 +62,8 @@ services:
ports:
- "${WORKSPACE_SSH_PORT}:22"
tty: true
environment:
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
networks:
- frontend
- backend
@ -123,6 +125,8 @@ services:
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL}
volumes_from:
- applications
volumes:
- ./php-worker/supervisord.d:/etc/supervisord.d
depends_on:
- workspace
extra_hosts:
@ -508,7 +512,6 @@ services:
build: ./elasticsearch
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
- elasticsearch-plugins:/usr/share/elasticsearch/plugins
environment:
- cluster.name=laradock-cluster
- bootstrap.memory_lock=true
@ -748,5 +751,3 @@ volumes:
driver: "local"
elasticsearch-data:
driver: "local"
elasticsearch-plugins:
driver: "local"

View File

@ -1,3 +1,3 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:5.4.1
FROM docker.elastic.co/elasticsearch/elasticsearch:6.2.3
EXPOSE 9200 9300

View File

@ -15,7 +15,7 @@ RUN apt-get update -y \
RUN mkdir -p /var/www
ADD server.ini /etc/hhvm/server.ini
COPY server.ini /etc/hhvm/server.ini
RUN usermod -u 1000 www-data

View File

@ -2,7 +2,7 @@ FROM mariadb:latest
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
ADD my.cnf /etc/mysql/conf.d/my.cnf
COPY my.cnf /etc/mysql/conf.d/my.cnf
CMD ["mysqld"]

View File

@ -13,7 +13,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN chown -R mysql:root /var/lib/mysql/
ADD my.cnf /etc/mysql/conf.d/my.cnf
COPY my.cnf /etc/mysql/conf.d/my.cnf
CMD ["mysqld"]

View File

@ -2,7 +2,7 @@ FROM nginx:alpine
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
ADD nginx.conf /etc/nginx/
COPY nginx.conf /etc/nginx/
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.

View File

@ -11,11 +11,17 @@ server {
try_files $uri @rewriteapp;
}
# For Symfony 3
location @rewriteapp {
rewrite ^(.*)$ /app.php/$1 last;
}
# For Symfony 4 config
# location @rewriteapp {
# rewrite ^(.*)$ /index.php/$1 last;
# }
location ~ ^/(app|app_dev|config)\.php(/|$) {
location ~ ^/(app|app_dev|config|index)\.php(/|$) {
fastcgi_pass php-upstream;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;

View File

@ -4,7 +4,7 @@ LABEL maintainer="DTUNES <diegotdai@gmai.com>"
RUN chown -R mysql:root /var/lib/mysql/
ADD my.cnf /etc/mysql/conf.d/my.cnf
COPY my.cnf /etc/mysql/conf.d/my.cnf
CMD ["mysqld"]

View File

@ -358,8 +358,8 @@ RUN php -v | head -n 1 | grep -q "PHP 5.6."
#--------------------------------------------------------------------------
#
ADD ./laravel.ini /usr/local/etc/php/conf.d
ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
COPY ./laravel.ini /usr/local/etc/php/conf.d
COPY ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
#RUN rm -r /var/lib/apt/lists/*

View File

@ -380,8 +380,8 @@ RUN php -v | head -n 1 | grep -q "PHP 7.0."
#--------------------------------------------------------------------------
#
ADD ./laravel.ini /usr/local/etc/php/conf.d/
ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
COPY ./laravel.ini /usr/local/etc/php/conf.d/
COPY ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
#RUN rm -r /var/lib/apt/lists/*

View File

@ -380,8 +380,8 @@ RUN php -v | head -n 1 | grep -q "PHP 7.1."
#--------------------------------------------------------------------------
#
ADD ./laravel.ini /usr/local/etc/php/conf.d
ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
COPY ./laravel.ini /usr/local/etc/php/conf.d
COPY ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
#RUN rm -r /var/lib/apt/lists/*

View File

@ -383,8 +383,8 @@ RUN php -v | head -n 1 | grep -q "PHP 7.2."
#--------------------------------------------------------------------------
#
ADD ./laravel.ini /usr/local/etc/php/conf.d
ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
COPY ./laravel.ini /usr/local/etc/php/conf.d
COPY ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
#RUN rm -r /var/lib/apt/lists/*

View File

@ -6,10 +6,5 @@ port = 127.0.0.1:9001
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/artisan queue:work --sleep=3 --tries=3 --daemon
autostart=true
autorestart=true
numprocs=8
redirect_stderr=true
[include]
files = supervisord.d/*.conf

View File

@ -0,0 +1,7 @@
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/artisan queue:work --sleep=3 --tries=3 --daemon
autostart=true
autorestart=true
numprocs=8
redirect_stderr=true

View File

@ -19,8 +19,8 @@ ENV VARNISH_PORT 6081
ENV BACKEND_HOST localhost
ENV BACKEND_PORT 80
ADD default.vcl /etc/varnish/default.vcl
ADD start.sh /etc/varnish/start.sh
COPY default.vcl /etc/varnish/default.vcl
COPY start.sh /etc/varnish/start.sh
RUN chmod +x /etc/varnish/start.sh

View File

@ -54,9 +54,8 @@ ENV PUID ${PUID}
ENV PGID ${PGID}
RUN groupadd -g ${PGID} laradock && \
useradd -u ${PUID} -g laradock -m laradock && \
usermod -p "*" laradock && \
apt-get update -yqq
useradd -u ${PUID} -g laradock -m laradock -G docker_env && \
usermod -p "*" laradock
#####################################
# SOAP:
@ -209,8 +208,8 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
ARG INSTALL_WORKSPACE_SSH=false
ENV INSTALL_WORKSPACE_SSH ${INSTALL_WORKSPACE_SSH}
ADD insecure_id_rsa /tmp/id_rsa
ADD insecure_id_rsa.pub /tmp/id_rsa.pub
COPY insecure_id_rsa /tmp/id_rsa
COPY insecure_id_rsa.pub /tmp/id_rsa.pub
RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \
rm -f /etc/service/sshd/down && \

View File

@ -54,9 +54,8 @@ ENV PUID ${PUID}
ENV PGID ${PGID}
RUN groupadd -g ${PGID} laradock && \
useradd -u ${PUID} -g laradock -m laradock && \
usermod -p "*" laradock && \
apt-get update -yqq
useradd -u ${PUID} -g laradock -m laradock -G docker_env && \
usermod -p "*" laradock
#####################################
# SOAP:
@ -206,8 +205,8 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
ARG INSTALL_WORKSPACE_SSH=false
ENV INSTALL_WORKSPACE_SSH ${INSTALL_WORKSPACE_SSH}
ADD insecure_id_rsa /tmp/id_rsa
ADD insecure_id_rsa.pub /tmp/id_rsa.pub
COPY insecure_id_rsa /tmp/id_rsa
COPY insecure_id_rsa.pub /tmp/id_rsa.pub
RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \
rm -f /etc/service/sshd/down && \

View File

@ -54,7 +54,7 @@ ENV PUID ${PUID}
ENV PGID ${PGID}
RUN groupadd -g ${PGID} laradock && \
useradd -u ${PUID} -g laradock -m laradock && \
useradd -u ${PUID} -g laradock -m laradock -G docker_env && \
usermod -p "*" laradock
#####################################
@ -202,8 +202,8 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
ARG INSTALL_WORKSPACE_SSH=false
ENV INSTALL_WORKSPACE_SSH ${INSTALL_WORKSPACE_SSH}
ADD insecure_id_rsa /tmp/id_rsa
ADD insecure_id_rsa.pub /tmp/id_rsa.pub
COPY insecure_id_rsa /tmp/id_rsa
COPY insecure_id_rsa.pub /tmp/id_rsa.pub
RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \
rm -f /etc/service/sshd/down && \

View File

@ -54,10 +54,9 @@ ENV PUID ${PUID}
ENV PGID ${PGID}
RUN groupadd -g ${PGID} laradock && \
useradd -u ${PUID} -g laradock -m laradock && \
useradd -u ${PUID} -g laradock -m laradock -G docker_env && \
usermod -p "*" laradock
#####################################
# SOAP:
#####################################
@ -203,8 +202,8 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
ARG INSTALL_WORKSPACE_SSH=false
ENV INSTALL_WORKSPACE_SSH ${INSTALL_WORKSPACE_SSH}
ADD insecure_id_rsa /tmp/id_rsa
ADD insecure_id_rsa.pub /tmp/id_rsa.pub
COPY insecure_id_rsa /tmp/id_rsa
COPY insecure_id_rsa.pub /tmp/id_rsa.pub
RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \
rm -f /etc/service/sshd/down && \