cutelyst-thread-apg-batch.dockerfile 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. FROM ubuntu:22.04
  2. RUN apt-get update -qq && \
  3. apt-get install -yqq locales wget build-essential
  4. RUN locale-gen en_US.UTF-8
  5. ENV LANG en_US.UTF-8
  6. ENV LANGUAGE en_US:en
  7. ENV LC_ALL en_US.UTF-8
  8. ENV DEBIAN_FRONTEND noninteractive
  9. ENV TROOT /cutelyst-benchmark-app
  10. ENV CUTELYST_APP ${TROOT}/build/libcutelyst_benchmarks.so
  11. COPY src ${TROOT}/
  12. COPY build.sh .
  13. RUN ./build.sh
  14. COPY config/config.ini /cutelyst.ini
  15. COPY config/config_socket.ini /cutelyst_socket.ini
  16. COPY nginx.conf /nginx.conf
  17. RUN sed -i "s|DatabaseHostName=.*|DatabaseHostName=tfb-database|g" /cutelyst.ini
  18. RUN sed -i "s|DatabaseHostName=.*|DatabaseHostName=tfb-database|g" /cutelyst_socket.ini
  19. ENV C_PROCESSES 1
  20. ENV CPU_AFFINITY 1
  21. ENV DRIVER postgres
  22. RUN sed -i "s|Driver=.*|Driver=${DRIVER}|g" /cutelyst.ini
  23. EXPOSE 8080
  24. CMD ${TROOT}/build/cutelyst-benchmarks \
  25. --ini /cutelyst.ini:uwsgi \
  26. --application ${CUTELYST_APP} \
  27. --processes=${C_PROCESSES} \
  28. --threads=$(nproc) \
  29. --cpu-affinity=${CPU_AFFINITY} \
  30. --socket-timeout 0 \
  31. --reuse-port