-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
root
committed
Dec 17, 2016
1 parent
8e8ad0b
commit 9438fd6
Showing
6 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# See https://github.com/openresty/docker-openresty/blob/master/alpine/Dockerfile | ||
FROM openresty/openresty:1.11.2.2-alpine | ||
|
||
COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf | ||
COPY profile.sh /etc/profile.d/netcomposer.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
NAME="netcomposer/elastic-openresty:1.11.2-0" | ||
docker build -t $NAME . # && docker push $NAME | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
|
||
http { | ||
default_type application/octet-stream; | ||
sendfile on; | ||
#tcp_nopush on; | ||
#keepalive_timeout 0; | ||
keepalive_timeout 65; | ||
|
||
upstream elastic { | ||
server elastic:9200; | ||
keepalive 15; | ||
} | ||
|
||
server { | ||
listen 9200; | ||
location / { | ||
proxy_pass http://elastic; | ||
proxy_http_version 1.1; | ||
proxy_set_header Connection "Keep-Alive"; | ||
proxy_set_header Proxy-Connection "Keep-Alive"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export PATH=$PATH:/usr/local/openresty/nginx/sbin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
IMAGE=netcomposer/elastic-openresty:1.11.2-0 | ||
|
||
docker rm elastic_openresty > /dev/null 2>&1 | ||
|
||
docker run \ | ||
-ti \ | ||
--name elastic_openresty \ | ||
--network elastic \ | ||
-p 9201:9200 \ | ||
-v /etc/letsencrypt:/etc/letsencrypt:ro \ | ||
$IMAGE | ||
|
||
# --restart unless-stopped \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
IMAGE=netcomposer/elastic-openresty:1.11.2-0 | ||
|
||
docker service create \ | ||
--name elastic_openresty \ | ||
--network elastic \ | ||
-p 9201:9200 \ | ||
--mount type=bind,src=/etc/letsencrypt,dst=/etc/letsencrypt:ro \ | ||
$IMAGE | ||
|
||
# --restart unless-stopped \ | ||
|