Skip to content

Commit

Permalink
laravel-echo-server add change source
Browse files Browse the repository at this point in the history
  • Loading branch information
haoyuqi committed Jul 25, 2020
1 parent bb759d7 commit 7e51378
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,8 @@ services:
laravel-echo-server:
build:
context: ./laravel-echo-server
args:
- CHANGE_SOURCE=${CHANGE_SOURCE}
volumes:
- ./laravel-echo-server/laravel-echo-server.json:/app/laravel-echo-server.json:ro
ports:
Expand Down
8 changes: 8 additions & 0 deletions laravel-echo-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ WORKDIR /usr/src/app
# Install app dependencies
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 \
python \
python-dev \
Expand Down

0 comments on commit 7e51378

Please sign in to comment.