Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
laradock
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kerwin
laradock
Commits
a99281cd
Commit
a99281cd
authored
Nov 14, 2017
by
牟勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change application source from dl-cdn.alpinelinux.org to aliyun source
parent
1342b696
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
env-example
env-example
+5
-0
Dockerfile
nginx/Dockerfile
+9
-4
No files found.
env-example
View file @
a99281cd
...
...
@@ -2,6 +2,11 @@
# General Setup
###########################################################
### Environment ########################################################################################################
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
CHANGE_SOURCE=false
### Application Path ###################################################################################################
# Point to your code, will be available at `/var/www`.
...
...
nginx/Dockerfile
View file @
a99281cd
...
...
@@ -4,17 +4,22 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
ADD
nginx.conf /etc/nginx/
ARG
PHP_UPSTREAM_CONTAINER=php-fpm
ARG
PHP_UPSTREAM_PORT=9000
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
# fix a problem--#397, change application source from dl-cdn.alpinelinux.org to aliyun source.
RUN
sed
-i
's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/'
/etc/apk/repositories
ARG
CHANGE_SOURCE=false
RUN if
[
${
CHANGE_SOURCE
}
=
true
]
;
then
\
# Change application source from dl-cdn.alpinelinux.org to aliyun source
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories
;fi
RUN
apk update
\
&&
apk upgrade
\
&&
apk add
--no-cache
bash
\
&&
adduser
-D
-H
-u
1000
-s
/bin/bash www-data
ARG
PHP_UPSTREAM_CONTAINER=php-fpm
ARG
PHP_UPSTREAM_PORT=9000
# Set upstream conf and remove the default conf
RUN
echo
"upstream php-upstream { server
${
PHP_UPSTREAM_CONTAINER
}
:
${
PHP_UPSTREAM_PORT
}
; }"
>
/etc/nginx/conf.d/upstream.conf
\
&&
rm
/etc/nginx/conf.d/default.conf
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment