Merge branch 'master' into install-dnsutils

This commit is contained in:
Silas 2022-10-31 12:19:13 +01:00 committed by GitHub
commit d6e2d51dae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 96 additions and 63 deletions

View File

@ -43,8 +43,8 @@ PHP_VERSION=7.4
### Phalcon Version ###########################################
# Select a Phalcon version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 3.4.0+
PHALCON_VERSION=4.0.5
# Select a Phalcon version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 5.0.0+
PHALCON_VERSION=5.0.0
### PHP Interpreter #######################################
@ -206,6 +206,7 @@ WORKSPACE_PROTOC_VERSION=latest
WORKSPACE_INSTALL_MEMCACHED=true
WORKSPACE_INSTALL_EVENT=false
WORKSPACE_INSTALL_DNSUTILS=true
WORKSPACE_XDEBUG_PORT=9003
### PHP_FPM ###############################################
@ -380,6 +381,7 @@ APACHE_PHP_UPSTREAM_TIMEOUT=60
APACHE_DOCUMENT_ROOT=/var/www/
APACHE_SSL_PATH=./apache2/ssl/
APACHE_INSTALL_HTTP2=false
APACHE_FOR_MAC_M1=false
### MYSQL #################################################
@ -1052,3 +1054,7 @@ NATS_ROUTE_PORT=8222
### SOKETI ##################################################
SOKETI_PORT=6001
SOKETI_METRICS_SERVER_PORT=9601
### ONEDEV ##################################################
ONEDEV_HTTP_PORT=6610
ONEDEV_SSH_PORT=6611

View File

@ -127,3 +127,21 @@ WORKSPACE_INSTALL_LIBPNG=true
docker-compose build workspace
```
## Apache2 container won't start on mac m1
To fix the problem you can follow those steps
1 - Open the `.env`.
2 - Search for `APACHE_FOR_MAC_M1` or add the key, if missing.
3 - Set the value to true:
```dotenv
APACHE_FOR_MAC_M1=true
```
4 - Finally rebuild the workspace image
```bash
docker-compose build apache2
```

View File

@ -29,4 +29,13 @@ ENTRYPOINT ["/opt/docker/bin/entrypoint.sh"]
CMD ["/bin/bash", "/opt/startup.sh"]
EXPOSE 80 443
EXPOSE 80 443
ARG APACHE_FOR_MAC_M1=false
RUN if [ ${APACHE_FOR_MAC_M1} = true ]; then \
# Change application source from deb.debian.org to aliyun source
wget -O "/usr/local/bin/go-replace" "https://github.com/webdevops/goreplace/releases/download/1.1.2/gr-arm64-linux" && \
chmod +x "/usr/local/bin/go-replace" && \
"/usr/local/bin/go-replace" --version \
;fi

View File

@ -1,4 +1,4 @@
FROM caddy/caddy:latest
FROM caddy:latest
COPY ./caddy/Caddyfile /etc/caddy/Caddyfile

View File

@ -74,6 +74,7 @@ services:
- INSTALL_GMP=${WORKSPACE_INSTALL_GMP}
- INSTALL_GNUPG=${WORKSPACE_INSTALL_GNUPG}
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
- XDEBUG_PORT=${WORKSPACE_XDEBUG_PORT}
- INSTALL_PCOV=${WORKSPACE_INSTALL_PCOV}
- INSTALL_PHPDBG=${WORKSPACE_INSTALL_PHPDBG}
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
@ -219,6 +220,7 @@ services:
- INSTALL_GMP=${PHP_FPM_INSTALL_GMP}
- INSTALL_GNUPG=${PHP_FPM_INSTALL_GNUPG}
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
- XDEBUG_PORT=${PHP_FPM_XDEBUG_PORT}
- INSTALL_PCOV=${PHP_FPM_INSTALL_PCOV}
- INSTALL_PHPDBG=${PHP_FPM_INSTALL_PHPDBG}
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
@ -296,8 +298,6 @@ services:
- ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
- docker-in-docker:/certs/client
ports:
- "${PHP_FPM_XDEBUG_PORT}:9003"
expose:
- "9000"
extra_hosts:
@ -487,6 +487,7 @@ services:
- PHP_UPSTREAM_TIMEOUT=${APACHE_PHP_UPSTREAM_TIMEOUT}
- DOCUMENT_ROOT=${APACHE_DOCUMENT_ROOT}
- APACHE_INSTALL_HTTP2=${APACHE_INSTALL_HTTP2}
- APACHE_FOR_MAC_M1=${APACHE_FOR_MAC_M1}
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
- ${APACHE_HOST_LOG_PATH}:/var/log/apache2
@ -2077,3 +2078,17 @@ services:
- ${TARANTOOL_ADMIN_PORT}:80
networks:
- backend
### onedev ####################################################
onedev:
image: 1dev/server
ports:
- "${ONEDEV_HTTP_PORT}:6610"
- "${ONEDEV_SSH_PORT}:6611"
volumes:
- ${DATA_PATH_HOST}/onedev:/opt/onedev
- /var/run/docker.sock:/var/run/docker.sock
networks:
- frontend
- backend
restart: always

View File

@ -212,12 +212,13 @@ RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
###########################################################################
ARG INSTALL_XDEBUG=false
ARG XDEBUG_PORT=9003
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Install the xdebug extension
# https://xdebug.org/docs/compat
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ] || { [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && { [ $(php -r "echo PHP_MINOR_VERSION;") = "4" ] || [ $(php -r "echo PHP_MINOR_VERSION;") = "3" ] ;} ;}; then \
pecl install xdebug-3.1.2; \
pecl install xdebug-3.1.4; \
else \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install xdebug-2.5.5; \
@ -235,10 +236,10 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Copy xdebug configuration for remote debugging
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
RUN if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
RUN if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ] || { [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && { [ $(php -r "echo PHP_MINOR_VERSION;") = "4" ] || [ $(php -r "echo PHP_MINOR_VERSION;") = "3" ] ;} ;}; then \
sed -i "s/xdebug.remote_host=/xdebug.client_host=/" /usr/local/etc/php/conf.d/xdebug.ini && \
sed -i "s/xdebug.remote_connect_back=0/xdebug.discover_client_host=false/" /usr/local/etc/php/conf.d/xdebug.ini && \
sed -i "s/xdebug.remote_port=9000/xdebug.client_port=9003/" /usr/local/etc/php/conf.d/xdebug.ini && \
sed -i "s/xdebug.remote_port=9000/xdebug.client_port=${XDEBUG_PORT}/" /usr/local/etc/php/conf.d/xdebug.ini && \
sed -i "s/xdebug.profiler_enable=0/; xdebug.profiler_enable=0/" /usr/local/etc/php/conf.d/xdebug.ini && \
sed -i "s/xdebug.profiler_output_dir=/xdebug.output_dir=/" /usr/local/etc/php/conf.d/xdebug.ini && \
sed -i "s/xdebug.remote_mode=req/; xdebug.remote_mode=req/" /usr/local/etc/php/conf.d/xdebug.ini && \
@ -850,25 +851,13 @@ ARG INSTALL_PHALCON=false
ARG LARADOCK_PHALCON_VERSION
ENV LARADOCK_PHALCON_VERSION ${LARADOCK_PHALCON_VERSION}
# Copy phalcon configration
COPY ./phalcon.ini /usr/local/etc/php/conf.d/phalcon.ini.disable
RUN if [ $INSTALL_PHALCON = true ]; then \
apt-get install -yqq unzip libpcre3-dev gcc make re2c git automake autoconf\
&& git clone https://github.com/jbboehr/php-psr.git \
&& cd php-psr \
&& phpize \
&& ./configure \
&& make \
&& make test \
&& make install \
&& curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${LARADOCK_PHALCON_VERSION}.zip \
&& unzip -d /tmp/ /tmp/cphalcon.zip \
&& cd /tmp/cphalcon-${LARADOCK_PHALCON_VERSION}/build \
&& ./install \
&& mv /usr/local/etc/php/conf.d/phalcon.ini.disable /usr/local/etc/php/conf.d/phalcon.ini \
&& rm -rf /tmp/cphalcon* \
;fi
apt-get update -yqq \
&& pecl channel-update pecl.php.net \
&& apt-get install -yqq libpcre3-dev; \
pecl install phalcon-${LARADOCK_PHALCON_VERSION}; \
docker-php-ext-enable phalcon \
;fi
###########################################################################
# APCU:

View File

@ -310,24 +310,17 @@ RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
# Install Phalcon ext
ARG INSTALL_PHALCON=false
ARG PHALCON_VERSION
ENV PHALCON_VERSION ${PHALCON_VERSION}
ARG LARADOCK_PHALCON_VERSION
ENV LARADOCK_PHALCON_VERSION ${LARADOCK_PHALCON_VERSION}
RUN if [ $INSTALL_PHALCON = true ]; then \
apk --update add unzip gcc make re2c bash\
&& git clone https://github.com/jbboehr/php-psr.git \
&& cd php-psr \
&& phpize \
&& ./configure \
&& make \
&& make test \
&& make install \
&& curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${PHALCON_VERSION}.zip \
&& unzip -d /tmp/ /tmp/cphalcon.zip \
&& cd /tmp/cphalcon-${PHALCON_VERSION}/build \
&& ./install \
&& rm -rf /tmp/cphalcon* \
;fi
apt-get update -yqq \
&& pecl channel-update pecl.php.net \
&& apt-get install -yqq libpcre3-dev; \
pecl install phalcon-${LARADOCK_PHALCON_VERSION}; \
docker-php-ext-enable phalcon; \
php -m | grep -q 'phalcon' \
;fi
ARG INSTALL_GHOSTSCRIPT=false
RUN if [ $INSTALL_GHOSTSCRIPT = true ]; then \

View File

@ -327,13 +327,14 @@ RUN set -eux; \
USER root
ARG INSTALL_XDEBUG=false
ARG XDEBUG_PORT=9003
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Install the xdebug extension
# https://xdebug.org/docs/compat
apt-get install -yqq pkg-config php-xml php${LARADOCK_PHP_VERSION}-xml && \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ] || { [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && { [ $(php -r "echo PHP_MINOR_VERSION;") = "4" ] || [ $(php -r "echo PHP_MINOR_VERSION;") = "3" ] ;} ;}; then \
pecl install xdebug-3.1.2; \
pecl install xdebug-3.1.4; \
else \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install xdebug-2.5.5; \
@ -351,10 +352,10 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# ADD for REMOTE debugging
COPY ./xdebug.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini
RUN if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ]; then \
RUN if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ] || { [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && { [ $(php -r "echo PHP_MINOR_VERSION;") = "4" ] || [ $(php -r "echo PHP_MINOR_VERSION;") = "3" ] ;} ;}; then \
sed -i "s/xdebug.remote_host=/xdebug.client_host=/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
sed -i "s/xdebug.remote_connect_back=0/xdebug.discover_client_host=false/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
sed -i "s/xdebug.remote_port=9000/xdebug.client_port=9003/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
sed -i "s/xdebug.remote_port=9000/xdebug.client_port=${XDEBUG_PORT}/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
sed -i "s/xdebug.profiler_enable=0/; xdebug.profiler_enable=0/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
sed -i "s/xdebug.profiler_output_dir=/xdebug.output_dir=/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
sed -i "s/xdebug.remote_mode=req/; xdebug.remote_mode=req/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \
@ -1322,23 +1323,14 @@ ARG LARADOCK_PHALCON_VERSION
ENV LARADOCK_PHALCON_VERSION ${LARADOCK_PHALCON_VERSION}
RUN if [ $INSTALL_PHALCON = true ]; then \
apt-get update && apt-get install -yqq unzip libpcre3-dev gcc make re2c git automake autoconf\
&& git clone https://github.com/jbboehr/php-psr.git \
&& cd php-psr \
&& phpize \
&& ./configure \
&& make \
&& make test \
&& make install \
&& curl -L -o /tmp/cphalcon.zip https://github.com/phalcon/cphalcon/archive/v${LARADOCK_PHALCON_VERSION}.zip \
&& unzip -d /tmp/ /tmp/cphalcon.zip \
&& cd /tmp/cphalcon-${LARADOCK_PHALCON_VERSION}/build \
&& ./install \
&& echo "extension=psr.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/phalcon.ini \
&& echo "extension=phalcon.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/phalcon.ini \
&& ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/phalcon.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-phalcon.ini \
&& rm -rf /tmp/cphalcon* \
;fi
apt-get update -yqq \
&& pecl channel-update pecl.php.net \
&& apt-get install -yqq libpcre3-dev; \
pecl install phalcon-${LARADOCK_PHALCON_VERSION}; \
echo "extension=phalcon.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/phalcon.ini; \
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/phalcon.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/50-phalcon.ini; \
php -m | grep -q 'phalcon' \
;fi
###########################################################################
USER root

View File

@ -148,3 +148,14 @@ function fs() {
du $arg .[^.]* ./*;
fi;
}
# Add artisan autocomplete
function _artisan()
{
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
COMMANDS=`php artisan --raw --no-ansi list | sed "s/[[:space:]].*//g"`
COMPREPLY=(`compgen -W "$COMMANDS" -- "${COMP_WORDS[COMP_CWORD]}"`)
return 0
}
complete -F _artisan art
complete -F _artisan artisan