|
@@ -22,47 +22,14 @@ ENV LANGUAGE en_US:en
|
|
|
ENV LC_ALL en_US.UTF-8
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
|
|
-ENV QT_VERSION_MM 59
|
|
|
-ENV QT_VERSION_FULL 594-xenial
|
|
|
-ENV CMAKE_PREFIX_PATH /opt/qt${QT_VERSION_MM}
|
|
|
-ENV LD_LIBRARY_PATH ${CMAKE_PREFIX_PATH}/lib
|
|
|
-
|
|
|
-ENV QT_VERSION_MM 59
|
|
|
-ENV QT_VERSION_FULL 594-xenial
|
|
|
-ENV CMAKE_PREFIX_PATH /opt/qt${QT_VERSION_MM}
|
|
|
-ENV LD_LIBRARY_PATH ${CMAKE_PREFIX_PATH}/lib
|
|
|
-
|
|
|
-RUN apt-add-repository --yes ppa:beineri/opt-qt$QT_VERSION_FULL && \
|
|
|
- apt update -qq && \
|
|
|
- apt install -yqq \
|
|
|
- cmake \
|
|
|
- clearsilver-dev \
|
|
|
- libgrantlee5-dev \
|
|
|
- libjemalloc-dev \
|
|
|
- qt${QT_VERSION_MM}base \
|
|
|
- qt${QT_VERSION_MM}script \
|
|
|
- qt${QT_VERSION_MM}tools
|
|
|
-
|
|
|
-RUN apt install -yqq uwsgi uwsgi uuid-dev libcap-dev libzmq3-dev
|
|
|
-
|
|
|
-ENV CUTELYST_VER 2.0.1
|
|
|
-
|
|
|
-RUN wget -q https://github.com/cutelyst/cutelyst/archive/v$CUTELYST_VER.tar.gz -O cutelyst-$CUTELYST_VER.tar.gz && \
|
|
|
- tar zxf cutelyst-$CUTELYST_VER.tar.gz && \
|
|
|
- cd cutelyst-$CUTELYST_VER && mkdir build && cd build && \
|
|
|
- cmake .. \
|
|
|
- -DCMAKE_BUILD_TYPE=Release \
|
|
|
- -DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
- -DPLUGIN_UWSGI=on \
|
|
|
- -DPLUGIN_VIEW_GRANTLEE=on \
|
|
|
- -DUSE_JEMALLOC=on && \
|
|
|
- make && make install
|
|
|
-
|
|
|
ENV TROOT /cutelyst-benchmark-app
|
|
|
-ENV LD_LIBRARY_PATH ${CMAKE_PREFIX_PATH}/lib
|
|
|
ENV CUTELYST_APP ${TROOT}/build/libcutelyst_benchmarks.so
|
|
|
|
|
|
COPY src ${TROOT}/
|
|
|
+
|
|
|
+COPY build.sh .
|
|
|
+RUN ./build.sh
|
|
|
+
|
|
|
COPY config/config.ini /cutelyst.ini
|
|
|
COPY config/config_socket.ini /cutelyst_socket.ini
|
|
|
COPY nginx.conf /nginx.conf
|
|
@@ -70,21 +37,14 @@ COPY nginx.conf /nginx.conf
|
|
|
RUN sed -i "s|DatabaseHostName=.*|DatabaseHostName=tfb-database|g" /cutelyst.ini
|
|
|
RUN sed -i "s|DatabaseHostName=.*|DatabaseHostName=tfb-database|g" /cutelyst_socket.ini
|
|
|
|
|
|
-RUN cd ${TROOT} && \
|
|
|
- mkdir -p build && \
|
|
|
- cd build && \
|
|
|
- cmake ${TROOT} \
|
|
|
- -DCMAKE_BUILD_TYPE=Release && \
|
|
|
- make
|
|
|
-
|
|
|
ENV C_PROCESSES 1
|
|
|
-ENV CPU_AFFINITY 1
|
|
|
+ENV CPU_AFFINITY 2
|
|
|
|
|
|
CMD cutelyst-wsgi2 \
|
|
|
--ini /cutelyst.ini:uwsgi \
|
|
|
--application ${CUTELYST_APP} \
|
|
|
--processes=${C_PROCESSES} \
|
|
|
- --threads=$(nproc) \
|
|
|
+ --threads=$(( (`nproc` + 1) / 2 )) \
|
|
|
--cpu-affinity=${CPU_AFFINITY} \
|
|
|
--socket-timeout 0 \
|
|
|
--reuse-port \
|