rabin 7 gadi atpakaļ
vecāks
revīzija
5e2f17a268

+ 3 - 3
container/conf/web/nginx/nginx.conf

@@ -1,4 +1,4 @@
-user  nginx;
+#user  nginx;
 worker_processes  8;
 daemon off;
 
@@ -12,7 +12,7 @@ events {
 
 
 http {
-    include       /etc/nginx/mime.types;
+    include       mime.types;
     default_type  application/octet-stream;
 
     log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
@@ -28,5 +28,5 @@ http {
 
     #gzip  on;
 
-    include /etc/nginx/conf.d/*.conf;
+    include conf.d/*.conf;
 }

+ 8 - 7
src/docker/build/web/openresty/Dockerfile

@@ -1,17 +1,18 @@
-FROM docker.dever.cc/os/alpine/v3.4:latest
+FROM docker.dever.cc/os/alpine:latest
 
 MAINTAINER Rabin "https://github.com/shemic"
 
 ENV OR_HOME=/usr/local/openresty
-ENV OR_VERSION=1.11.2.5
-ENV PATH=$PATH:$OR_HOME/bin
+ENV OR_VERSION=1.13.6.1
+ENV PATH=$PATH:$OR_HOME/bin:$OR_HOME/nginx/sbin
 
-RUN apk add --no-cache --update curl gcc make perl libpcre32 libressl-dev openssl musl-dev pcre-dev zlib-dev && \
-	curl -O https://openresty.org/download/openresty-{$OR_VERSION}.tar.gz && \
-	tar -zxvf openresty-{$OR_VERSION}.tar.gz && \
-	cd openresty-{$OR_VERSION} && \
+RUN apk add --no-cache --update curl gcc make perl libpcre32 pcre libgcc libressl-dev openssl musl-dev pcre-dev zlib-dev && \
+	curl -O https://openresty.org/download/openresty-${OR_VERSION}.tar.gz && \
+	tar -zxvf openresty-${OR_VERSION}.tar.gz && \
+	cd openresty-${OR_VERSION} && \
 	./configure && \
 	make && make install && \
+	mkdir -p /var/log/nginx && \
 	apk del curl gcc make perl libpcre32 libressl-dev openssl musl-dev pcre-dev
 
 COPY openresty.sh /entrypoint/openresty.sh

+ 9 - 1
src/docker/conf/web.conf

@@ -36,4 +36,12 @@ alias = php,composer
 port = 80:80,443:443
 link = [php]{num}:[php]{num}
 volumes_from = [php]{num}
-volumes = {container}web:/www,{container}conf/web/nginx:/etc/nginx,{container}logs/nginx/{name}/logs:/var/log/nginx
+volumes = {container}web:/www,{container}conf/web/nginx:/etc/nginx,{container}logs/nginx/{name}/logs:/var/log/nginx
+
+[#nginx]
+image = openresty
+port = 80:80,443:443
+link = [php]{num}:[php]{num}
+volumes_from = [php]{num}
+volumes = {container}web:/www,{container}conf/web/nginx:/usr/local/openresty/nginx/conf,{container}logs/nginx/openresty_{name}/logs:/var/log/nginx
+command = nginx

+ 1 - 0
src/docker/core.conf

@@ -28,6 +28,7 @@ golang				= dev/golang
 
 ;web
 nginx				= web/nginx
+openresty			= web/openresty
 
 ;iot
 emqtt				= iot/emqtt