workspace and php-fpm change source

This commit is contained in:
mouyong 2019-08-09 08:52:32 +08:00
parent da8f0d0864
commit f64adc2114
9 changed files with 68 additions and 5 deletions

View File

@ -55,6 +55,7 @@ services:
build:
context: ./workspace
args:
- CHANGE_SOURCE=${CHANGE_SOURCE}
- LARADOCK_PHP_VERSION=${PHP_VERSION}
- LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
- INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION}
@ -126,6 +127,7 @@ services:
- no_proxy
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
- "./workspace/crontab/laradock:/etc/cron.d/laradock"
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
ports:
@ -145,6 +147,7 @@ services:
build:
context: ./php-fpm
args:
- CHANGE_SOURCE=${CHANGE_SOURCE}
- LARADOCK_PHP_VERSION=${PHP_VERSION}
- LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
@ -200,6 +203,7 @@ services:
- "9000"
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
dns: 114.114.114.114
environment:
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
- DOCKER_HOST=tcp://docker-in-docker:2375
@ -211,6 +215,7 @@ services:
links:
- docker-in-docker
### PHP Worker ############################################
php-worker:
build:

View File

@ -6,5 +6,11 @@
[mysql]
[mysqld]
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
character-set-server=utf8mb4
skip-name-resolve
symbolic-links=0
explicit_defaults_for_timestamp
default_authentication_plugin=mysql_native_password
#skip-grant-tables=1

View File

@ -24,6 +24,16 @@ ARG LARADOCK_PHP_VERSION
# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
ADD debian.sources.list /etc/apt/debian.sources.list
ARG CHANGE_SOURCE=false
RUN if [ ${CHANGE_SOURCE} = true ]; then \
mv /etc/apt/sources.list /etc/apt/sources.list.back && \
mv /etc/apt/debian.sources.list /etc/apt/sources.list \
;fi
# always run apt update when start and after add new source list, then clean up at end.
RUN set -xe; \
apt-get update -yqq && \

View File

@ -0,0 +1,8 @@
deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb http://mirrors.aliyun.com/debian-security stretch/updates main
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main
deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib

View File

@ -5,14 +5,19 @@ xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.idekey=PHPSTORM
xdebug.remote_autostart=0
xdebug.remote_autostart=1
xdebug.remote_enable=0
xdebug.cli_color=0
xdebug.cli_color=1
xdebug.profiler_enable=0
xdebug.profiler_output_dir="~/xdebug/phpstorm/tmp/profiling"
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_log=/var/log/php/xdebug_remote.log
xdebug.auto_trace = 1
xdebug.collect_params = 1
xdebug.collect_return = 1
xdebug.var_display_max_children=-1
xdebug.var_display_max_data=-1

View File

@ -24,6 +24,15 @@ ARG LARADOCK_PHP_VERSION
# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
ADD ubuntu.sources.list /etc/apt/ubuntu.sources.list
ARG CHANGE_SOURCE=false
RUN if [ ${CHANGE_SOURCE} = true ]; then \
mv /etc/apt/sources.list /etc/apt/sources.list.back && \
mv /etc/apt/ubuntu.sources.list /etc/apt/sources.list \
;fi
# Start as root
USER root

View File

@ -0,0 +1,15 @@
deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe

View File

@ -5,14 +5,19 @@ xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.idekey=PHPSTORM
xdebug.remote_autostart=0
xdebug.remote_autostart=1
xdebug.remote_enable=0
xdebug.cli_color=0
xdebug.cli_color=1
xdebug.profiler_enable=0
xdebug.profiler_output_dir="~/xdebug/phpstorm/tmp/profiling"
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_log=/var/log/php/xdebug_remote.log
xdebug.auto_trace = 1
xdebug.collect_params = 1
xdebug.collect_return = 1
xdebug.var_display_max_children=-1
xdebug.var_display_max_data=-1