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
6e07061d
Commit
6e07061d
authored
Jul 26, 2016
by
Mahmoud Zalt
Committed by
GitHub
Jul 26, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #184 from computerfr33k/nginx-alpine
Nginx alpine image
parents
c60cb9ab
e4f6cec5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
Dockerfile
nginx/Dockerfile
+9
-6
nginx.conf
nginx/nginx.conf
+3
-5
No files found.
nginx/Dockerfile
View file @
6e07061d
FROM
nginx:
latest
FROM
nginx:
alpine
MAINTAINER
Mahmoud Zalt <mahmoud@zalt.me>
ADD
nginx.conf /etc/nginx/
ADD
laravel.conf /etc/nginx/
sites-available/
ADD
laravel.conf /etc/nginx/
conf.d/laravel.conf
ARG
PHP_UPSTREAM
ARG
PHP_UPSTREAM
=php-fpm
RUN
echo
"upstream php-upstream { server
${
PHP_UPSTREAM
}
:9000; }"
>
/etc/nginx/conf.d/upstream.conf
RUN
usermod
-u
1000 www-data
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
CMD
["nginx"]
...
...
nginx/nginx.conf
View file @
6e07061d
user
www-data
;
worker_processes
4
;
pid
/run/nginx.pid
;
daemon
off
;
events
{
worker_connections
2048
;
...
...
@@ -18,13 +19,10 @@ http {
client_max_body_size
20M
;
include
/etc/nginx/mime.types
;
default_type
application/octet-stream
;
access_log
on
;
error_log
on
;
access_log
/var/log/nginx/access.log
;
error_log
/var/log/nginx/error.log
;
gzip
on
;
gzip_disable
"msie6"
;
include
/etc/nginx/conf.d/*.conf
;
include
/etc/nginx/sites-available/*
;
open_file_cache
max=100
;
}
daemon
off
;
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