Compare commits

...

13 Commits
v12.0 ... v12.1

Author SHA1 Message Date
ba71f06eac Merge pull request #2953 from laradock/enchant
feat(support enchant extension): php-fpm
2021-04-17 17:53:47 +08:00
743942e1e1 php-fpm support enchant extension 2021-04-17 16:20:05 +08:00
b3cdfd5cd2 Merge pull request #2952 from laradock/fix-2828
Fix Laravel-Horizon and PHP-Worker Build Issue
2021-04-17 16:18:12 +08:00
ddcf0b08da php-worker support memcached extension 2021-04-17 01:08:33 +08:00
f1bcc81ec6 fix horizon memcached 2021-04-17 01:03:40 +08:00
8251316651 Merge pull request #2951 from laradock/ci-schedule-not-trigger-in-fork
Don't trigger on schedule event when in a fork
2021-04-15 19:45:57 +08:00
9a48ed7dae Merge pull request #2883 from aydin41k/update-env-example
Renamed env-example for IDE-compatibity; added PHP version 8.0 in the example values
2021-04-15 14:19:14 +08:00
9597c08961 Don't trigger on schedule event when in a fork 2021-04-15 14:16:50 +08:00
894439d081 Resolved conflict in main-ci.yml 2021-04-13 11:11:08 +10:00
844bd3d5d9 Resolved conflicts with the latest version 2021-04-13 11:08:30 +10:00
e7db566eee Renamed env-example to .env.example for conformity and IDE-compatibility; added PHP version 8.0 in the example values 2021-04-13 11:05:02 +10:00
d759e82a02 Renamed env-example to .env.example in documentation, reference and build files 2021-03-23 17:49:15 +11:00
33b75637e5 Renamed env-example to .env.example for conformity and IDE-compatibility; added PHP version 8.0 in the example values 2021-03-15 21:12:37 +11:00
12 changed files with 60 additions and 44 deletions

View File

@ -38,7 +38,7 @@ COMPOSE_PROJECT_NAME=laradock
### PHP Version ###########################################
# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM).
# Accepted values: 7.4 - 7.3 - 7.2 - 7.1 - 7.0 - 5.6
# Accepted values: 8.0 - 7.4 - 7.3 - 7.2 - 7.1 - 7.0 - 5.6
PHP_VERSION=7.3
### Phalcon Version ###########################################
@ -215,6 +215,7 @@ PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=true
PHP_FPM_INSTALL_PHPREDIS=true
PHP_FPM_INSTALL_MEMCACHED=false
PHP_FPM_INSTALL_BZ2=false
PHP_FPM_INSTALL_ENCHANT=false
PHP_FPM_INSTALL_GMP=false
PHP_FPM_INSTALL_GNUPG=false
PHP_FPM_INSTALL_XDEBUG=false
@ -288,6 +289,7 @@ PHP_WORKER_INSTALL_GNUPG=false
PHP_WORKER_INSTALL_PGSQL=false
PHP_WORKER_INSTALL_MONGO=false
PHP_WORKER_INSTALL_BCMATH=false
PHP_WORKER_INSTALL_MEMCACHED=false
# PHP_WORKER_INSTALL_OCI8 Does not work in php5.6 version
PHP_WORKER_INSTALL_OCI8=false
PHP_WORKER_INSTALL_PHALCON=false

View File

@ -10,6 +10,8 @@ on:
jobs:
build-php:
# Don't trigger on schedule event when in a fork
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'laradock/laradock')
runs-on: ubuntu-latest
strategy:
fail-fast: false
@ -23,7 +25,7 @@ jobs:
PHP_VERSION: ${{ matrix.php_version }}
run: |
set -eux
cp env-example .env
cp .env.example .env
sed -i -- 's/=false/=true/g' .env
sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env
sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env
@ -42,6 +44,8 @@ jobs:
docker-compose down
build-other:
# Don't trigger on schedule event when in a fork
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'laradock/laradock')
runs-on: ubuntu-latest
strategy:
fail-fast: false
@ -51,7 +55,7 @@ jobs:
- uses: actions/checkout@v2
- name: Build the Docker image
run: |
cp env-example .env
cp .env.example .env
sed -i -- 's/=false/=true/g' .env
sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env
docker-compose build ${{ matrix.service }}

View File

@ -1,6 +1,6 @@
{
"files.associations": {
"env-example": "dotenv",
".env.example": "dotenv",
"Dockerfile-*": "dockerfile"
}
}

View File

@ -81,7 +81,7 @@ To update the sidebar or add a new section to it, you can edit this `DOCUMENTATI
* Make sure you follow the same code/comments style.
* Add the environment variables to the `env-example` if you have any.
* Add the environment variables to the `.env.example` if you have any.
* **MOST IMPORTANTLY** update the `Documentation`, add as much information.

View File

@ -75,7 +75,7 @@ Your folder structure should look like this:
We'll need to do step 1 of the [Usage](#Usage) section now to make this happen.
```
cp env-example .env
cp .env.example .env
```
At the top, change the `APP_CODE_PATH_HOST` variable to your project path.
@ -155,10 +155,10 @@ We recommend using a Docker version which is newer than 1.13.
<br>
1 - Enter the laradock folder and copy `env-example` to `.env`
1 - Enter the laradock folder and copy `.env.example` to `.env`
```shell
cp env-example .env
cp .env.example .env
```
You can edit the `.env` file to choose which software's you want to be installed in your environment. You can always refer to the `docker-compose.yml` file to see how those variables are being used.

View File

@ -46,10 +46,10 @@ Let's see how easy it is to setup our demo stack `PHP`, `NGINX`, `MySQL`, `Redis
git clone https://github.com/Laradock/laradock.git
```
2 - Enter the laradock folder and rename `env-example` to `.env`.
2 - Enter the laradock folder and rename `.env.example` to `.env`.
```shell
cp env-example .env
cp .env.example .env
```
3 - Run your containers:

View File

@ -70,7 +70,7 @@ git clone https://github.com/laradock/laradock.git
2. 进入 Laradock 目录
```bash
cp env-example .env
cp .env.example .env
```
3. 运行这些容器。

View File

@ -209,6 +209,7 @@ services:
- LARADOCK_PHP_VERSION=${PHP_VERSION}
- LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
- INSTALL_BZ2=${PHP_FPM_INSTALL_BZ2}
- INSTALL_ENCHANT=${PHP_FPM_INSTALL_ENCHANT}
- INSTALL_GMP=${PHP_FPM_INSTALL_GMP}
- INSTALL_GNUPG=${PHP_FPM_INSTALL_GNUPG}
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
@ -318,6 +319,7 @@ services:
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL}
- INSTALL_MONGO=${PHP_WORKER_INSTALL_MONGO}
- INSTALL_BCMATH=${PHP_WORKER_INSTALL_BCMATH}
- INSTALL_MEMCACHED=${PHP_WORKER_INSTALL_MEMCACHED}
- INSTALL_OCI8=${PHP_WORKER_INSTALL_OCI8}
- INSTALL_PHALCON=${PHP_WORKER_INSTALL_PHALCON}
- INSTALL_SOAP=${PHP_WORKER_INSTALL_SOAP}

View File

@ -23,7 +23,6 @@ RUN apk --update add wget \
curl \
git \
build-base \
libmemcached-dev \
libmcrypt-dev \
libxml2-dev \
pcre-dev \
@ -40,13 +39,6 @@ RUN apk --update add wget \
RUN pecl channel-update pecl.php.net; \
docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl
RUN if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install memcached-2.2.0 mcrypt-1.0.1; \
else \
pecl install memcached mcrypt-1.0.1; \
fi; \
docker-php-ext-enable memcached
# Add a non-root user to help install ffmpeg:
ARG PUID=1000
ENV PUID ${PUID}
@ -270,25 +262,20 @@ RUN if [ ${INSTALL_YAML} = true ]; then \
ARG INSTALL_MEMCACHED=false
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
apk --update add libmemcached-dev; \
# Install the php memcached extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/2.2.0.tar.gz"; \
pecl install memcached-2.2.0; \
else \
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/v3.1.4.tar.gz"; \
fi \
&& mkdir -p memcached \
&& tar -C memcached -zxvf /tmp/memcached.tar.gz --strip 1 \
&& ( \
cd memcached \
&& phpize \
&& ./configure \
&& make -j$(nproc) \
&& make install \
) \
&& rm -r memcached \
&& rm /tmp/memcached.tar.gz \
&& docker-php-ext-enable memcached \
;fi
pecl install memcached; \
fi; \
docker-php-ext-enable memcached; \
php -m | grep -r 'memcached'; \
fi
#--------------------------------------------------------------------------
# Clean up
#--------------------------------------------------------------------------
RUN rm /var/cache/apk/* \
&& mkdir -p /var/www

View File

@ -83,6 +83,17 @@ RUN if [ ${INSTALL_BZ2} = true ]; then \
docker-php-ext-install bz2 \
;fi
###########################################################################
# Enchant:
###########################################################################
ARG INSTALL_ENCHANT=false
RUN if [ ${INSTALL_ENCHANT} = true ]; then \
apt-get install -yqq libenchant-dev; \
docker-php-ext-install enchant; \
php -m | grep -oiE '^enchant$'; \
fi
###########################################################################
# GMP (GNU Multiple Precision):
###########################################################################

View File

@ -23,7 +23,6 @@ RUN apk --update add wget \
curl \
git \
build-base \
libmemcached-dev \
libmcrypt-dev \
libxml2-dev \
pcre-dev \
@ -40,13 +39,6 @@ RUN apk --update add wget \
RUN pecl channel-update pecl.php.net; \
docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl
RUN if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install memcached-2.2.0 mcrypt-1.0.1; \
else \
pecl install memcached mcrypt-1.0.1; \
fi; \
docker-php-ext-enable memcached
# Add a non-root user:
ARG PUID=1000
ENV PUID ${PUID}
@ -404,6 +396,24 @@ RUN if [ ${INSTALL_XMLRPC} = true ]; then \
php -m | grep -r 'xmlrpc'; \
fi
###########################################################################
# PHP Memcached:
###########################################################################
ARG INSTALL_MEMCACHED=false
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
apk --update add libmemcached-dev; \
# Install the php memcached extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install memcached-2.2.0; \
else \
pecl install memcached; \
fi; \
docker-php-ext-enable memcached; \
php -m | grep -r 'memcached'; \
fi
#
#--------------------------------------------------------------------------
# Optional Supervisord Configuration

View File

@ -11,7 +11,7 @@ env | sort
#### Build the Docker Images
if [ -n "${PHP_VERSION}" ]; then
cp env-example .env
cp .env.example .env
sed -i -- "s/PHP_VERSION=.*/PHP_VERSION=${PHP_VERSION}/g" .env
sed -i -- 's/=false/=true/g' .env
sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env