diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..835a35c --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,16 @@ +variables: + REGISTRY: "registry.gitlab.resds.ru" + +stages: + - build + +.docker-login: + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$REGISTRY" + +build: + extends: .docker-login + stage: build + script: + - docker build -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" . + - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..40a3be0 --- /dev/null +++ b/dockerfile @@ -0,0 +1,8 @@ +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 +COPY ./ /app/ +RUN git submodule init && git submodule update +RUN cmake --build /app/ -j 4 -DCMAKE_BUILD_TYPE=Release