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
5c0b8316
Commit
5c0b8316
authored
Aug 03, 2017
by
Mahmoud Zalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make the PHP_UPSTREAM config for NGINX and Apache identical
parent
004e4354
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
11 deletions
+19
-11
Dockerfile
apache2/Dockerfile
+3
-2
docker-compose.yml
docker-compose.yml
+5
-3
env-example
env-example
+4
-2
Dockerfile
nginx/Dockerfile
+7
-4
No files found.
apache2/Dockerfile
View file @
5c0b8316
...
...
@@ -2,9 +2,10 @@ FROM webdevops/apache:ubuntu-16.04
MAINTAINER
Eric Pfeiffer <computerfr33k@users.noreply.github.com>
ARG
PHP_SOCKET=php-fpm:9000
ARG
PHP_UPSTREAM_CONTAINER=php-fpm
ARG
PHP_UPSTREAM_PORT=9000
ENV
WEB_PHP_SOCKET=$
PHP_SOCKET
ENV
WEB_PHP_SOCKET=$
{PHP_UPSTREAM_CONTAINER}:${PHP_UPSTREAM_PORT}
ENV
WEB_DOCUMENT_ROOT=/var/www/public/
...
...
docker-compose.yml
View file @
5c0b8316
...
...
@@ -107,13 +107,14 @@ services:
networks
:
-
backend
### N
ginx
Server Container ##################################
### N
GINX
Server Container ##################################
nginx
:
build
:
context
:
./nginx
args
:
-
PHP_UPSTREAM=php-fpm
-
PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
-
PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
volumes_from
:
-
applications
volumes
:
...
...
@@ -146,7 +147,8 @@ services:
build
:
context
:
./apache2
args
:
-
PHP_SOCKET=${PHP_SOCKET}
-
PHP_UPSTREAM_CONTAINER=${APACHE_PHP_UPSTREAM_CONTAINER}
-
PHP_UPSTREAM_PORT=${APACHE_PHP_UPSTREAM_PORT}
volumes_from
:
-
applications
volumes
:
...
...
env-example
View file @
5c0b8316
...
...
@@ -80,15 +80,17 @@ NGINX_HOST_HTTP_PORT=80
NGINX_HOST_HTTPS_PORT=443
NGINX_HOST_LOG_PATH=./logs/nginx/
NGINX_SITES_PATH=./nginx/sites/
NGINX_PHP_UPSTREAM_CONTAINER=php-fpm
NGINX_PHP_UPSTREAM_PORT=9000
### APACHE #############################################################################################################
APACHE_HOST_HTTP_PORT=80
APACHE_HOST_HTTPS_PORT=443
APACHE2_PHP_SOCKET=php-fpm:9000
APACHE_HOST_LOG_PATH=./logs/apache2
APACHE_SITES_PATH=./apache2/sites
PHP_SOCKET=php-fpm:9000
APACHE_PHP_UPSTREAM_CONTAINER=php-fpm
APACHE_PHP_UPSTREAM_PORT=9000
### MYSQL ##############################################################################################################
...
...
nginx/Dockerfile
View file @
5c0b8316
...
...
@@ -4,7 +4,8 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
ADD
nginx.conf /etc/nginx/
ARG
PHP_UPSTREAM=php-fpm
ARG
PHP_UPSTREAM_CONTAINER=php-fpm
ARG
PHP_UPSTREAM_PORT=9000
# 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
...
...
@@ -12,9 +13,11 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories
RUN
apk update
\
&&
apk upgrade
\
&&
apk add
--no-cache
bash
\
&&
adduser
-D
-H
-u
1000
-s
/bin/bash www-data
\
&&
rm
/etc/nginx/conf.d/default.conf
\
&&
echo
"upstream php-upstream { server
${
PHP_UPSTREAM
}
:9000; }"
>
/etc/nginx/conf.d/upstream.conf
&&
adduser
-D
-H
-u
1000
-s
/bin/bash www-data
# 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
CMD
["nginx"]
...
...
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