Commit 4b07616a by Amir Aharon

finished first wroking version 1.6.0

parent f8baf298
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
build
Makefile
.make.state
.idea
.gradle
tmp
cmake-build-debug
_CPack_Packages
CMakeFiles
CMakeCache.txt
cmake_install.cmake
install_manifest.txt
*.cmake
GPATH
GTAGS
GSYMS
GRTAGS
*.cbp
*.tar.gz
...@@ -37,14 +37,12 @@ ...@@ -37,14 +37,12 @@
"environment": [] "environment": []
}, },
{ {
"name": "C++ Launch (GDB)", "name": "C++ App Test",
"type": "cppdbg", "type": "cppdbg",
"request": "launch", "request": "launch",
"launchOptionType": "Local",
// "preLaunchTask": "start-gdbserver",
"miDebuggerPath": "/usr/bin/gdb", "miDebuggerPath": "/usr/bin/gdb",
"targetArchitecture": "x64", "targetArchitecture": "x64",
"program": "${workspaceRoot}/build/bin/test_Microservice", "program": "${workspaceRoot}/build/build/bin/test_Microservice",
"args": [], "args": [],
"stopAtEntry": false, "stopAtEntry": false,
"cwd": "${workspaceRoot}", "cwd": "${workspaceRoot}",
......
...@@ -141,23 +141,23 @@ file (GLOB INSTALL_FILES "src/utils/*.h") ...@@ -141,23 +141,23 @@ file (GLOB INSTALL_FILES "src/utils/*.h")
install(FILES ${INSTALL_FILES} DESTINATION include/microservice/utils) install(FILES ${INSTALL_FILES} DESTINATION include/microservice/utils)
# 3party libs # 3party libs
INSTALL( DIRECTORY ../3party/lib DESTINATION lib/3party ) INSTALL( DIRECTORY 3party/lib DESTINATION lib/3party )
# internal libs # internal libs
#file (GLOB INSTALL_FILES "../internals/lib/libRabbitmq.*") #file (GLOB INSTALL_FILES "../internals/lib/libRabbitmq.*")
#install(FILES ${INSTALL_FILES} DESTINATION lib/internals) #install(FILES ${INSTALL_FILES} DESTINATION lib/internals)
#include 3party files #include 3party files
INSTALL( DIRECTORY ../3party/cereal-1.2.1/include DESTINATION include/3party/cereal-1.2.1 ) #INSTALL( DIRECTORY 3party/cereal-1.2.1/include DESTINATION include/3party/cereal-1.2.1 )
INSTALL( DIRECTORY ../3party/rapidjson-cereal-1.2.1 DESTINATION include/3party ) #INSTALL( DIRECTORY /3party/rapidjson-cereal-1.2.1 DESTINATION include/3party )
INSTALL( DIRECTORY ../3party/cppmetrics-0.1.1-Linux/include DESTINATION include/3party/cppmetrics ) INSTALL( DIRECTORY 3party/include/cppmetrics DESTINATION include/3party/cppmetrics )
file (GLOB INSTALL_FILES "../3party/mongoose/mongoose.*") # file (GLOB INSTALL_FILES "../3party/mongoose/mongoose.*")
install(FILES ${INSTALL_FILES} DESTINATION include/3party/mongoose) # install(FILES ${INSTALL_FILES} DESTINATION include/3party/mongoose)
#INSTALL( DIRECTORY ../3party/cpprest/Release/include DESTINATION include/3party/cpprest ) #INSTALL( DIRECTORY ../3party/cpprest/Release/include DESTINATION include/3party/cpprest )
INSTALL( DIRECTORY ../3party/evpp/build-release/include DESTINATION include/3party/evpp ) # INSTALL( DIRECTORY ../3party/evpp/build-release/include DESTINATION include/3party/evpp )
INSTALL( DIRECTORY ../3party/rabbitmq DESTINATION include/3party ) # INSTALL( DIRECTORY ../3party/rabbitmq DESTINATION include/3party )
#INSTALL( DIRECTORY ../internals/include/Rabbitmq DESTINATION include/internals ) #INSTALL( DIRECTORY ../internals/include/Rabbitmq DESTINATION include/internals )
INSTALL( DIRECTORY /usr/include/hiredis DESTINATION include/3party ) # INSTALL( DIRECTORY /usr/include/hiredis DESTINATION include/3party )
INSTALL( DIRECTORY ../3party/flatbuffers/include DESTINATION include/3party/flatbuffers ) # INSTALL( DIRECTORY ../3party/flatbuffers/include DESTINATION include/3party/flatbuffers )
#CPack #CPack
include (InstallRequiredSystemLibraries) include (InstallRequiredSystemLibraries)
......
...@@ -2,11 +2,28 @@ ...@@ -2,11 +2,28 @@
#FROM ubuntu-debootstrap:14.04 #FROM ubuntu-debootstrap:14.04
FROM municipalitybank.com:5050/ipgallery.common.cpp/microservice/develop FROM municipalitybank.com:5050/ipgallery.common.cpp/microservice/develop
USER develop USER root
WORKDIR /home/vscode/project
COPY . /home/vscode/project/
RUN mkdir /home/develop/dist RUN cmake . \
COPY ./target/*.tar.gz /home/develop/dist/ && make \
RUN cd /home/develop/dist && tar xzf *.tar.gz && make install \
&& mkdir -p /home/vscode/microservice \
&& cp -r dist /home/vscode/microservice/
# delete microservice project content
RUN rm -rf /home/vscode/project
WORKDIR /home/vscode
# cleanup
RUN apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
# RUN mkdir -p /home/vscode/microservice
# COPY build/dist /home/vscode/microservice/
# COPY ./target/*.tar.gz /home/develop/dist/
# RUN cd /home/develop/dist && tar xzf *.tar.gz
# setting for gcc >= 4.9.2 # setting for gcc >= 4.9.2
#RUN rm /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #RUN rm /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#COPY ./tmp/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #COPY ./tmp/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6
...@@ -15,7 +32,7 @@ RUN cd /home/develop/dist && tar xzf *.tar.gz ...@@ -15,7 +32,7 @@ RUN cd /home/develop/dist && tar xzf *.tar.gz
#RUN echo kernel.shmmax=49249672960 >> /etc/sysctl.conf #RUN echo kernel.shmmax=49249672960 >> /etc/sysctl.conf
#RUN echo kernel.shmall=10485760 >> /etc/sysctl.conf #RUN echo kernel.shmall=10485760 >> /etc/sysctl.conf
EXPOSE 50010 #EXPOSE 50010
# ENTRYPOINT ["/bin/bash"] # ENTRYPOINT ["/bin/bash"]
...@@ -3,7 +3,7 @@ FROM municipalitybank.com:5050/mcx/devops/dev-cpp:vscode-gcc8 ...@@ -3,7 +3,7 @@ FROM municipalitybank.com:5050/mcx/devops/dev-cpp:vscode-gcc8
# install deb packages # install deb packages
USER root USER root
COPY ./doc/install-deb-dependencies.sh /usr/ COPY ./script/install-deb-dependencies.sh /usr/
RUN chmod +x /usr/install-deb-dependencies.sh RUN chmod +x /usr/install-deb-dependencies.sh
RUN apt-get update RUN apt-get update
...@@ -11,7 +11,7 @@ RUN /usr/install-deb-dependencies.sh ...@@ -11,7 +11,7 @@ RUN /usr/install-deb-dependencies.sh
# Clean up APT when done. # Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY ./doc/install-vcpkg-dependencies.sh /tmp/ COPY ./script/install-vcpkg-dependencies.sh /tmp/
RUN chmod +x /tmp/install-vcpkg-dependencies.sh RUN chmod +x /tmp/install-vcpkg-dependencies.sh
# install vcpkg packages # install vcpkg packages
USER vscode USER vscode
......
## C++ Microservice Framework ## C++ Microservice Framework
* to create microservice docker run script/build_microservice_docker.sh [version] * to create microservice docker run script/build_microservice_docker.sh [version]
## VERSIONS: ## VERSIONS:
# 1.6.0
- change workspace to vscode remote containers
- install most of dependencies either with apt or vcpkg in the remote container
- compile in c++17 flavor
# 1.5.3 # 1.5.3
- fix for IRequest->GetContent() in Evpp - fix for IRequest->GetContent() in Evpp
# 1.5.2 # 1.5.2
......
[c++17]
- bacause it's 2020
[replace boost with std]
- less dependencies
[sqlite+spatialite]
- small footprint
- embedded lib - less processes
- spatialite for geo indexing and search
[vscode - remote containers]
- no extra 3party code download and package installations on machine
- isolated development environment
- no gcc/cmake local dependencies
- can be ported to different linux architectures: e.g. alpine
...@@ -12,4 +12,4 @@ source /home/vscode/.bashrc ...@@ -12,4 +12,4 @@ source /home/vscode/.bashrc
echo "Installing vcpkg packages..." echo "Installing vcpkg packages..."
cd vcpkg && git pull cd vcpkg && git pull
#/home/vscode/vcpkg/vcpkg install evpp spdlog nlohmann-json cereal rapidjson flatbuffers poco hiredis glog log4cpp libuuid cppzmq #/home/vscode/vcpkg/vcpkg install evpp spdlog nlohmann-json cereal rapidjson flatbuffers poco hiredis glog log4cpp libuuid cppzmq
/home/vscode/vcpkg/vcpkg install evpp spdlog nlohmann-json cereal rapidjson flatbuffers poco hiredis glog log4cpp libuuid boost-foreach cpprest /home/vscode/vcpkg/vcpkg install evpp spdlog nlohmann-json cereal rapidjson flatbuffers poco hiredis glog log4cpp libuuid boost-foreach cpprestsdk
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment