Skip to content

Commit b4d071f

Browse files
committed
try with other image?
1 parent ad86eb0 commit b4d071f

File tree

3 files changed

+64
-7
lines changed

3 files changed

+64
-7
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# http, https
2+
ARG SERVER_SCHEME=http
3+
4+
# http, http2
5+
ARG SERVER_PROTOCOL=http
6+
7+
# custom scenario
8+
ARG CUSTOM_SCENARIO=default
9+
10+
# NOTE: nginx doesn't support http2 connections to the upstream server
11+
12+
FROM nginx:latest AS base
13+
14+
ENV WORKER_PROCESSES auto
15+
ENV DOWNSTREAM_SCHEME http
16+
ENV DOWNSTREAM_ADDRESS tfb-database
17+
ENV DOWNSTREAM_PORT 8080
18+
19+
ADD testCert.rsa /etc/ssl/private/testCert.rsa
20+
ADD testCert.crt /etc/ssl/certs/testCert.crt
21+
22+
ADD run.sh /
23+
RUN chmod +x /run.sh
24+
25+
# Listening to http connections
26+
FROM base AS scheme-http-http-default
27+
# ARG SERVER_SCHEME
28+
ADD nginx-http.conf /etc/nginx/nginx.conf
29+
30+
# Listening to https connections
31+
FROM base AS scheme-https-http-default
32+
# ARG SERVER_SCHEME
33+
ADD nginx-https.conf /etc/nginx/nginx.conf
34+
35+
# Listening to h2 connections
36+
FROM base AS scheme-https-http2-default
37+
# ARG SERVER_SCHEME
38+
ADD nginx-http2.conf /etc/nginx/nginx.conf
39+
40+
# Listening to h2c connections - not implemented, kept for reference
41+
# FROM base AS scheme-http-http2
42+
# ARG SERVER_SCHEME
43+
# ADD nginx-http2.conf /etc/nginx/nginx.conf
44+
45+
# Listening to gRPC connections
46+
FROM base AS scheme-https-grpc-default
47+
# ARG SERVER_SCHEME
48+
ADD nginx-grpc.conf /etc/nginx/nginx.conf
49+
50+
# Listening to simple TLS connections
51+
FROM base AS scheme-https-http-tls
52+
# ARG SERVER_SCHEME
53+
ADD nginx-plain-tls.conf /etc/nginx/nginx.conf
54+
55+
FROM scheme-${SERVER_SCHEME}-${SERVER_PROTOCOL}-${CUSTOM_SCENARIO} AS final
56+
57+
EXPOSE 8080
58+
59+
ENTRYPOINT ["/run.sh"]

docker/nginx/nginx-plain-tls.conf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ events {
55
# perf: ensures that each worker accepts as many connections as possible
66
multi_accept on;
77
worker_connections 1024;
8-
use epoll;
98
}
109

1110
http {
11+
12+
access_log off;
13+
1214
server {
1315
listen 8080 ssl;
1416

@@ -19,7 +21,6 @@ http {
1921
ssl_session_cache off;
2022
ssl_session_tickets off;
2123

22-
access_log off;
2324
error_log stdout info;
2425

2526
# returns plain text response

scenarios/tls.benchmarks.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,10 @@ jobs:
7676
source:
7777
Repository: https://github.com/aspnet/benchmarks.git
7878
BranchOrCommit: main
79-
DockerFile: docker/nginx/nginx.dockerfile
80-
DockerImageName: nginx-reverseproxy
79+
DockerFile: docker/nginx/nginx-latest.dockerfile
80+
DockerImageName: nginx-docker
8181
DockerContextDirectory: docker/nginx
8282
environmentVariables:
83-
DOWNSTREAM_SCHEME: '{{downstreamScheme}}'
84-
DOWNSTREAM_ADDRESS: '{{downstreamAddress}}'
85-
DOWNSTREAM_PORT: '{{downstreamPort}}'
8683
WORKER_PROCESSES: '{{cores}}'
8784
buildArguments:
8885
- SERVER_SCHEME=https

0 commit comments

Comments
 (0)