Browse Source

Bump drogon to v1.0.0-beta5 (#4970)

An Tao 6 years ago
parent
commit
ad6a3bcb61

+ 21 - 6
frameworks/C++/drogon/drogon-core.dockerfile

@@ -7,9 +7,8 @@ RUN  apt update -yqq && \
 	 apt install -yqq sudo curl wget cmake locales git \
      openssl libssl-dev \
      libjsoncpp-dev \
-     uuid-dev \
-     zlib1g-dev \
-	 postgresql-server-dev-all && \
+     uuid-dev libreadline-dev libbison-dev flex \
+     zlib1g-dev && \
      add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
 	 apt update -yqq && \
 	 apt install -yqq gcc-8 g++-8
@@ -27,19 +26,35 @@ ENV RANLIB=gcc-ranlib-8
 
 ENV IROOT=/install
 ENV DROGON_ROOT=$IROOT/drogon
+ENV PG_ROOT=$IROOT/postgres-batch_mode_ubuntu
 ENV TEST_PATH=/drogon_benchmark/build
+
+WORKDIR $IROOT
+
+RUN wget https://github.com/an-tao/postgres/archive/batch_mode_ubuntu.tar.gz
+RUN tar -xvzf batch_mode_ubuntu.tar.gz
+WORKDIR $PG_ROOT
+
+RUN ./configure --prefix=/usr CFLAGS='-O2 -pipe'
+RUN make && make install
+
 WORKDIR $IROOT
 
 RUN git clone https://github.com/an-tao/drogon
 
 WORKDIR $DROGON_ROOT
 
-RUN git checkout 135a2ebb6f63ee91ec1f11817b7bf68f1591ba43
+RUN git checkout 60ecbb945ece6b7afe289485c098349711810d78
+RUN git submodule update --init
+RUN mkdir build
+
+WORKDIR $DROGON_ROOT/build
 
-RUN ./build.sh
+RUN cmake -DCMAKE_BUILD_TYPE=release ..
+RUN make && make install
 
 WORKDIR $TEST_PATH
 
-RUN cmake ..
+RUN cmake -DCMAKE_BUILD_TYPE=release ..
 RUN make
 CMD ./drogon_benchmark config-core.json

+ 21 - 6
frameworks/C++/drogon/drogon-raw.dockerfile

@@ -7,9 +7,8 @@ RUN  apt update -yqq && \
 	 apt install -yqq sudo curl wget cmake locales git \
      openssl libssl-dev \
      libjsoncpp-dev \
-     uuid-dev \
-     zlib1g-dev \
-	 postgresql-server-dev-all && \
+     uuid-dev libreadline-dev libbison-dev flex \
+     zlib1g-dev && \
      add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
 	 apt update -yqq && \
 	 apt install -yqq gcc-8 g++-8
@@ -27,19 +26,35 @@ ENV RANLIB=gcc-ranlib-8
 
 ENV IROOT=/install
 ENV DROGON_ROOT=$IROOT/drogon
+ENV PG_ROOT=$IROOT/postgres-batch_mode_ubuntu
 ENV TEST_PATH=/drogon_benchmark/build
+
+WORKDIR $IROOT
+
+RUN wget https://github.com/an-tao/postgres/archive/batch_mode_ubuntu.tar.gz
+RUN tar -xvzf batch_mode_ubuntu.tar.gz
+WORKDIR $PG_ROOT
+
+RUN ./configure --prefix=/usr CFLAGS='-O2 -pipe'
+RUN make && make install
+
 WORKDIR $IROOT
 
 RUN git clone https://github.com/an-tao/drogon
 
 WORKDIR $DROGON_ROOT
 
-RUN git checkout 135a2ebb6f63ee91ec1f11817b7bf68f1591ba43
+RUN git checkout 60ecbb945ece6b7afe289485c098349711810d78
+RUN git submodule update --init
+RUN mkdir build
+
+WORKDIR $DROGON_ROOT/build
 
-RUN ./build.sh
+RUN cmake -DCMAKE_BUILD_TYPE=release ..
+RUN make && make install
 
 WORKDIR $TEST_PATH
 
-RUN cmake ..
+RUN cmake -DCMAKE_BUILD_TYPE=release ..
 RUN make
 CMD ./drogon_benchmark config-raw.json

+ 21 - 7
frameworks/C++/drogon/drogon.dockerfile

@@ -7,9 +7,8 @@ RUN  apt update -yqq && \
 	 apt install -yqq sudo curl wget cmake locales git \
      openssl libssl-dev \
      libjsoncpp-dev \
-     uuid-dev \
-     zlib1g-dev \
-	 postgresql-server-dev-all && \
+     uuid-dev libreadline-dev libbison-dev flex \
+     zlib1g-dev && \
      add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
 	 apt update -yqq && \
 	 apt install -yqq gcc-8 g++-8
@@ -27,20 +26,35 @@ ENV RANLIB=gcc-ranlib-8
 
 ENV IROOT=/install
 ENV DROGON_ROOT=$IROOT/drogon
+ENV PG_ROOT=$IROOT/postgres-batch_mode_ubuntu
 ENV TEST_PATH=/drogon_benchmark/build
+
+WORKDIR $IROOT
+
+RUN wget https://github.com/an-tao/postgres/archive/batch_mode_ubuntu.tar.gz
+RUN tar -xvzf batch_mode_ubuntu.tar.gz
+WORKDIR $PG_ROOT
+
+RUN ./configure --prefix=/usr CFLAGS='-O2 -pipe'
+RUN make && make install
+
 WORKDIR $IROOT
 
 RUN git clone https://github.com/an-tao/drogon
 
 WORKDIR $DROGON_ROOT
 
-RUN git checkout 135a2ebb6f63ee91ec1f11817b7bf68f1591ba43
+RUN git checkout 60ecbb945ece6b7afe289485c098349711810d78
+RUN git submodule update --init
+RUN mkdir build
+
+WORKDIR $DROGON_ROOT/build
 
-RUN ./build.sh
+RUN cmake -DCMAKE_BUILD_TYPE=release ..
+RUN make && make install
 
 WORKDIR $TEST_PATH
 
-RUN cmake ..
+RUN cmake -DCMAKE_BUILD_TYPE=release ..
 RUN make
 CMD ./drogon_benchmark config.json
-

+ 1 - 1
frameworks/C++/drogon/drogon_benchmark/config-core.json

@@ -134,7 +134,7 @@
         ],
         //idle_connection_timeout: defaults to 60 seconds, the lifetime 
         //of the connection without read or write
-        "idle_connection_timeout": 60,
+        "idle_connection_timeout": 0,
         //server_header_field: Set the 'server' header field in each response sent by drogon,
         //empty string by default with which the 'server' header field is set to "Server: drogon/version string\r\n"
         "server_header_field": "drogon",

+ 1 - 1
frameworks/C++/drogon/drogon_benchmark/config-raw.json

@@ -134,7 +134,7 @@
         ],
         //idle_connection_timeout: defaults to 60 seconds, the lifetime 
         //of the connection without read or write
-        "idle_connection_timeout": 60,
+        "idle_connection_timeout": 0,
         //server_header_field: Set the 'server' header field in each response sent by drogon,
         //empty string by default with which the 'server' header field is set to "Server: drogon/version string\r\n"
         "server_header_field": "drogon",

+ 1 - 1
frameworks/C++/drogon/drogon_benchmark/config.json

@@ -150,7 +150,7 @@
         ],
         //idle_connection_timeout: defaults to 60 seconds, the lifetime 
         //of the connection without read or write
-        "idle_connection_timeout": 60,
+        "idle_connection_timeout": 0,
         //server_header_field: Set the 'server' header field in each response sent by drogon,
         //empty string by default with which the 'server' header field is set to "Server: drogon/version string\r\n"
         "server_header_field": "dg",