Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Николай Степанов
OS4sem
Commits
9192d7ee
Commit
9192d7ee
authored
1 year ago
by
Denis
Browse files
Options
Download
Patches
Plain Diff
add docker
parent
a295b641
main
dev
service+metrics
service_fix
4 merge requests
!24
MVP+
,
!18
RK: MVP
,
!12
Serv+metr+repo
,
!11
Service+metrics
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
.dockerignore
+6
-0
.dockerignore
Dockerfile
+29
-31
Dockerfile
Makefile
+32
-0
Makefile
server/cmd/main.cpp
+3
-1
server/cmd/main.cpp
server/internal/entities/CMakeLists.txt
+0
-2
server/internal/entities/CMakeLists.txt
server/pkg/antlr/CMakeLists.txt
+1
-0
server/pkg/antlr/CMakeLists.txt
with
71 additions
and
34 deletions
+71
-34
.dockerignore
0 → 100644
+
6
−
0
View file @
9192d7ee
/cmake-build-debug/
/build/
/build1/
.vscode
.idea
CMakeUserPresets.json
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Dockerfile
+
29
−
31
View file @
9192d7ee
FROM
ubuntu:20.04
AS
base
FROM
ubuntu:20.04
AS
base
ENV
TZ=Europe/Moscow
ENV
TZ=Europe/Moscow
RUN
ln
-snf
/usr/share/zoneinfo/
$TZ
/etc/localtime
&&
echo
$TZ
>
/etc/timezone
RUN
ln
-snf
/usr/share/zoneinfo/
$TZ
/etc/localtime
&&
echo
$TZ
>
/etc/timezone
RUN
apt update
-y
RUN
apt update
-y
RUN
apt
install
-y
gcc
RUN
apt
install
-y
gcc
RUN
apt
install
-y
libpqxx-dev
RUN
apt
install
-y
libpqxx-dev
RUN
apt
install
-y
clang-tidy
RUN
apt
install
-y
clang-tidy
RUN
apt
install
-y
nlohmann-json3-dev
RUN
apt
install
-y
python3-pip
RUN
apt
install
-y
python3-pip
RUN
apt
install
-y
cppcheck
RUN
apt
install
-y
cppcheck
RUN
apt-get update
RUN
apt
install
-y
git
RUN
apt
install
-y
cmake
RUN
apt-get update
-y
RUN
apt-get update
RUN
apt
install
-y
xvfb
RUN
apt
install
-y
libboost-all-dev
RUN
pip
install
gcovr
RUN
apt
install
-y
nlohmann-json3-dev
RUN
pip
install
cpplint
RUN
apt
install
-y
git
RUN
apt
install
-y
qt5-default
RUN
apt-get update
RUN
apt
install
-y
default-jre
RUN
apt
-y
install
curl
RUN
pwd
WORKDIR
/usr/local/lib
RUN
curl
-O
https://www.antlr.org/download/antlr-4.12.0-complete.jar
RUN
apt
install
-y
xvfb
RUN
pip
install
gcovr
RUN
pip
install
cpplint
RUN
apt-get
install
wget
RUN
apt-get
install
libssl-dev
RUN
wget https://github.com/Kitware/CMake/releases/download/v3.26.3/cmake-3.26.3.tar.gz
RUN
tar
-zxvf
cmake-3.26.3.tar.gz
WORKDIR
cmake-3.26.3
RUN
./bootstrap
RUN
make
RUN
make
install
RUN
cd
..
RUN
wget https://boostorg.jfrog.io/artifactory/main/release/1.82.0/source/boost_1_82_0.tar.gz
RUN
tar
xvf boost_1_82_0.tar.gz
WORKDIR
boost_1_82_0
RUN
./bootstrap.sh
--prefix
=
/usr/
RUN
./b2
install
RUN
git clone https://github.com/google/googletest.git
-b
release-1.11.0
RUN
git clone https://github.com/google/googletest.git
-b
release-1.11.0
WORKDIR
googletest/build
WORKDIR
googletest/build
RUN
cmake ..
-DBUILD_GMOCK
=
O
FF
RUN
cmake ..
-DBUILD_GMOCK
=
O
N
RUN
make
RUN
make
RUN
make
install
RUN
make
install
WORKDIR
/project
WORKDIR
/project
COPY
. .
COPY
. .
\ No newline at end of file
EXPOSE
8080
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Makefile
0 → 100644
+
32
−
0
View file @
9192d7ee
generate
:
mkdir
build
cmake
-B
build/
build-project
:
cd
./build
&&
make
clean
:
rm
-rf
build
rebuild
:
clean generate build-project
server-run
:
./build/server/cmd/Server
test
:
ctest
--verbose
--output-on-failure
--test-dir
build/
build-docker
:
docker build
.
-f
Dockerfile
-t
ddt-project
dev
:
docker run
--rm
-it
\
-
v
$(
PWD
)
:/project
\
-
-name
app
\
ddt-project
stop-docker
:
docker stop app
This diff is collapsed.
Click to expand it.
server/cmd/main.cpp
+
3
−
1
View file @
9192d7ee
...
@@ -4,7 +4,8 @@
...
@@ -4,7 +4,8 @@
int
main
(
int
argc
,
const
char
*
argv
[])
{
int
main
(
int
argc
,
const
char
*
argv
[])
{
// ifstream ins("/home/denis/2023_1_DDT/antlr/test.py");
// ifstream ins("/home/denis/2023_1_DDT/antlr/test.py");
std
::
ifstream
ins
(
"/home/denis/2023_1_DDT/server/pkg/antlr/testprogs/python/test.py"
);
std
::
ifstream
ins
(
"/home/denis/2023_1_DDT/server/pkg/antlr/testprogs/python/test.py"
);
PythonAntlr
pA
=
PythonAntlr
(
ins
);
PythonAntlr
pA
=
PythonAntlr
(
ins
);
...
@@ -16,6 +17,7 @@ int main(int argc, const char* argv[]) {
...
@@ -16,6 +17,7 @@ int main(int argc, const char* argv[]) {
}
}
std
::
cout
<<
pA
.
getTreeString
()
<<
std
::
endl
;
std
::
cout
<<
pA
.
getTreeString
()
<<
std
::
endl
;
std
::
cout
<<
"test"
<<
std
::
endl
;
return
0
;
return
0
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
server/internal/entities/CMakeLists.txt
+
0
−
2
View file @
9192d7ee
cmake_minimum_required
(
VERSION 3.19
)
project
(
"EntitiesLib"
)
project
(
"EntitiesLib"
)
set
(
LIB_NAME libEntities
)
set
(
LIB_NAME libEntities
)
...
...
This diff is collapsed.
Click to expand it.
server/pkg/antlr/CMakeLists.txt
+
1
−
0
View file @
9192d7ee
...
@@ -10,6 +10,7 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
...
@@ -10,6 +10,7 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
include
(
ExternalAntlr4Cpp
)
include
(
ExternalAntlr4Cpp
)
include_directories
(
${
ANTLR4_INCLUDE_DIRS
}
)
include_directories
(
${
ANTLR4_INCLUDE_DIRS
}
)
set
(
ANTLR_EXECUTABLE /usr/local/lib/antlr-4.12.0-complete.jar
)
set
(
ANTLR_EXECUTABLE /usr/local/lib/antlr-4.12.0-complete.jar
)
find_package
(
ANTLR REQUIRED
)
find_package
(
ANTLR REQUIRED
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets