Skip to content
This repository was archived by the owner on Jul 21, 2021. It is now read-only.

Commit e17b765

Browse files
Adding travis.yml
1 parent 9d16c80 commit e17b765

File tree

5 files changed

+72
-0
lines changed

5 files changed

+72
-0
lines changed

.travis.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
language: minimal
2+
3+
services:
4+
- docker
5+
6+
install:
7+
- docker build -t nginx .
8+
9+
script:
10+
- docker run -d -p 8080:8080 -p 8081:8081 -v $(pwd)/test:/mnt/test nginx nginx -c /mnt/test/nginx.conf
11+
- curl -f --retry 10 --retry-delay 3 localhost:8080/healthcheck
12+
- curl -f --retry 10 --retry-delay 3 localhost:8081/healthcheck

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ RUN apt-get update && \
7171
--with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie' && \
7272
make && \
7373
make install && \
74+
# create temp folders
75+
mkdir -p /var/cache/nginx/client_temp && \
76+
mkdir -p /var/cache/nginx/proxy_temp && \
77+
mkdir -p /var/cache/nginx/fastcgi_temp && \
78+
mkdir -p /var/cache/nginx/uwsgi_temp && \
79+
mkdir -p /var/cache/nginx/scgi_temp && \
7480
# Adding open tracing modules
7581
mkdir /usr/lib/nginx && \
7682
mkdir /usr/lib/nginx/modules && \

test/jaeger-config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
service_name: nginx
2+
disabled: false
3+
reporter:
4+
logSpans: true
5+
localAgentHostPort: www.mocky.io:8080
6+
sampler:
7+
type: const
8+
param: 1

test/lightstep-config.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"access_token": "some-access-token",
3+
"component_name": "nginx",
4+
"collector_host": "www.mocky.io",
5+
"collector_port": 80,
6+
"collector_plaintext": false
7+
}

test/nginx.conf

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
load_module /usr/lib/nginx/modules/ngx_http_opentracing_module.so;
2+
3+
daemon off;
4+
user www-data;
5+
6+
events {
7+
worker_connections 768;
8+
}
9+
10+
http {
11+
opentracing on;
12+
server {
13+
listen 8080;
14+
15+
opentracing_load_tracer /usr/lib/nginx/modules/libjaegertracing_plugin.so /mnt/test/jaeger-config.yml;
16+
17+
location /healthcheck {
18+
default_type 'text/plain';
19+
20+
content_by_lua_block {
21+
ngx.say('Working')
22+
}
23+
}
24+
}
25+
26+
server {
27+
listen 8081;
28+
29+
opentracing_load_tracer /usr/lib/nginx/modules/liblightstep_tracer_plugin.so /mnt/test/lightstep-config.json;
30+
31+
location /healthcheck {
32+
default_type 'text/plain';
33+
34+
content_by_lua_block {
35+
ngx.say('Working')
36+
}
37+
}
38+
}
39+
}

0 commit comments

Comments
 (0)