From cb22ef5b3b1a7bbdf686c106dc85e9e3aa2240f7 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 26 Jun 2024 20:53:39 +0000 Subject: [PATCH] add change dockerfile and fix configfile --- .gitmodules | 3 +++ configuration.yaml | 2 +- configuration_vars.yaml | 2 +- dockerfile | 15 ++++++++++++--- log_analysis_frontend | 1 + 5 files changed, 18 insertions(+), 5 deletions(-) create mode 160000 log_analysis_frontend diff --git a/.gitmodules b/.gitmodules index 4d25646..d476166 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "third_party/userver"] path = third_party/userver url = https://github.com/userver-framework/userver.git +[submodule "log_analysis_frontend"] + path = log_analysis_frontend + url = https://gitlab.resds.ru/voloh.ka/log_analysis_frontend.git diff --git a/configuration.yaml b/configuration.yaml index 5495d30..94baf6b 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -39,7 +39,7 @@ components_manager: # Static content fs-cache-main: - dir: /mnt/c/Users/october/Desktop/dev/python_projects/log_analysis_web/log_analysis_web/site + dir: /app/log_analysis_web_backend/log_analysis_frontend handler-static: path: /* diff --git a/configuration_vars.yaml b/configuration_vars.yaml index 5dfca6a..4a2bee6 100644 --- a/configuration_vars.yaml +++ b/configuration_vars.yaml @@ -8,7 +8,7 @@ server-port: 8080 # Storage storage-database: log_analysis -storage-host: localhost +storage-host: postgres storage-port: 5432 storage-username: postgres storage-password: postgres diff --git a/dockerfile b/dockerfile index 64692d6..855cb3d 100644 --- a/dockerfile +++ b/dockerfile @@ -1,8 +1,17 @@ FROM ubuntu:focal-20240530 ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/Moscow" WORKDIR /app -RUN apt update && apt install git cmake fmtools python3-venv postgresql libpq-dev libev-dev libyaml-cpp-dev lld openssl libboost-all-dev gcc g++ postgresql pkg-config build-essential libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev libboost-filesystem-dev -y -RUN apt install libssl-dev openssl libcrypto++-dev libhttp-parser-dev libnghttp2-dev -y +RUN apt update && apt install git cmake python3-venv postgresql libpq-dev libev-dev libyaml-cpp-dev lld openssl libboost-all-dev gcc g++ postgresql pkg-config build-essential libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev libboost-filesystem-dev -y +RUN apt install libssl-dev openssl libcrypto++-dev wget ccache libhttp-parser-dev libc-ares-dev libnghttp2-dev golang fmtools libc-ares2 libcctz-dev libssh2-1-dev libfmt-dev -y COPY ./ /app/ +RUN wget https://github.com/fmtlib/fmt/archive/refs/tags/10.2.1.tar.gz && \ + tar -xzf 10.2.1.tar.gz && \ + cd fmt-10.2.1 && \ + mkdir build && cd build && \ + cmake .. && \ + make -j$(nproc) && \ + make install && cd /app/ && rm -rf fmt-10.2.1/ && rm 10.2.1.tar.gz RUN git submodule init && git submodule update -RUN cmake /app/ +RUN cmake -B build-dir -DCMAKE_BUILD_TYPE=Release +RUN /usr/bin/cmake --build build-dir/ -j 4 +CMD /app/build-dir/log_analysis/server/la_server --config configuration.yaml --config_vars configuration_vars.yaml diff --git a/log_analysis_frontend b/log_analysis_frontend new file mode 160000 index 0000000..cbafcf1 --- /dev/null +++ b/log_analysis_frontend @@ -0,0 +1 @@ +Subproject commit cbafcf133609998d23c5eee9040e44701cb04e0a