Merge pull request #2665 from haoyuqi/master

laravel-echo-server add change source
This commit is contained in:
Shao Yu-Lung (Allen) 2020-07-30 21:23:22 +08:00 committed by GitHub
commit 493a058d22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -1046,6 +1046,8 @@ services:
laravel-echo-server: laravel-echo-server:
build: build:
context: ./laravel-echo-server context: ./laravel-echo-server
args:
- CHANGE_SOURCE=${CHANGE_SOURCE}
volumes: volumes:
- ./laravel-echo-server/laravel-echo-server.json:/app/laravel-echo-server.json:ro - ./laravel-echo-server/laravel-echo-server.json:/app/laravel-echo-server.json:ro
ports: ports:

View File

@ -7,6 +7,14 @@ WORKDIR /usr/src/app
# Install app dependencies # Install app dependencies
COPY package.json /usr/src/app/ COPY package.json /usr/src/app/
# 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 add --update \ RUN apk add --update \
python \ python \
python-dev \ python-dev \