pref: add change source flag
This commit is contained in:
parent
ba23f41322
commit
b6204e5933
@ -234,6 +234,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./php-worker
|
context: ./php-worker
|
||||||
args:
|
args:
|
||||||
|
- CHANGE_SOURCE=${CHANGE_SOURCE}
|
||||||
- PHP_VERSION=${PHP_VERSION}
|
- PHP_VERSION=${PHP_VERSION}
|
||||||
- PHALCON_VERSION=${PHALCON_VERSION}
|
- PHALCON_VERSION=${PHALCON_VERSION}
|
||||||
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL}
|
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL}
|
||||||
@ -267,6 +268,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./laravel-horizon
|
context: ./laravel-horizon
|
||||||
args:
|
args:
|
||||||
|
- CHANGE_SOURCE=${CHANGE_SOURCE}
|
||||||
- PHP_VERSION=${PHP_VERSION}
|
- PHP_VERSION=${PHP_VERSION}
|
||||||
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
|
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
|
||||||
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
|
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
|
||||||
@ -290,9 +292,9 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./nginx
|
context: ./nginx
|
||||||
args:
|
args:
|
||||||
|
- CHANGE_SOURCE=${CHANGE_SOURCE}
|
||||||
- PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
|
- PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
|
||||||
- PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
|
- PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
|
||||||
- CHANGE_SOURCE=${CHANGE_SOURCE}
|
|
||||||
- http_proxy
|
- http_proxy
|
||||||
- https_proxy
|
- https_proxy
|
||||||
- no_proxy
|
- no_proxy
|
||||||
|
@ -9,6 +9,14 @@ FROM php:${PHP_VERSION}-alpine
|
|||||||
|
|
||||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||||
|
|
||||||
|
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
|
||||||
|
|
||||||
|
ARG CHANGE_SOURCE=false
|
||||||
|
RUN if [ ${CHANGE_SOURCE} = true ]; then \
|
||||||
|
# Change application source from dl-cdn.alpinelinux.org to aliyun source
|
||||||
|
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories \
|
||||||
|
;fi
|
||||||
|
|
||||||
RUN apk --update add wget \
|
RUN apk --update add wget \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
@ -50,7 +58,7 @@ ARG INSTALL_CASSANDRA=false
|
|||||||
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
|
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
|
||||||
apk --update add cassandra-cpp-driver \
|
apk --update add cassandra-cpp-driver \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
# Install PhpRedis package:
|
# Install PhpRedis package:
|
||||||
ARG INSTALL_PHPREDIS=false
|
ARG INSTALL_PHPREDIS=false
|
||||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||||
|
@ -9,6 +9,14 @@ FROM php:${PHP_VERSION}-alpine
|
|||||||
|
|
||||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||||
|
|
||||||
|
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
|
||||||
|
|
||||||
|
ARG CHANGE_SOURCE=false
|
||||||
|
RUN if [ ${CHANGE_SOURCE} = true ]; then \
|
||||||
|
# Change application source from dl-cdn.alpinelinux.org to aliyun source
|
||||||
|
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories \
|
||||||
|
;fi
|
||||||
|
|
||||||
RUN apk --update add wget \
|
RUN apk --update add wget \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
|
Loading…
Reference in New Issue
Block a user