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 @@
"environment": []
},
{
"name": "C++ Launch (GDB)",
"name": "C++ App Test",
"type": "cppdbg",
"request": "launch",
"launchOptionType": "Local",
// "preLaunchTask": "start-gdbserver",
"miDebuggerPath": "/usr/bin/gdb",
"targetArchitecture": "x64",
"program": "${workspaceRoot}/build/bin/test_Microservice",
"program": "${workspaceRoot}/build/build/bin/test_Microservice",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
......
......@@ -141,23 +141,23 @@ file (GLOB INSTALL_FILES "src/utils/*.h")
install(FILES ${INSTALL_FILES} DESTINATION include/microservice/utils)
# 3party libs
INSTALL( DIRECTORY ../3party/lib DESTINATION lib/3party )
INSTALL( DIRECTORY 3party/lib DESTINATION lib/3party )
# internal libs
#file (GLOB INSTALL_FILES "../internals/lib/libRabbitmq.*")
#install(FILES ${INSTALL_FILES} DESTINATION lib/internals)
#include 3party files
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/cppmetrics-0.1.1-Linux/include DESTINATION include/3party/cppmetrics )
file (GLOB INSTALL_FILES "../3party/mongoose/mongoose.*")
install(FILES ${INSTALL_FILES} DESTINATION include/3party/mongoose)
#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/include/cppmetrics DESTINATION include/3party/cppmetrics )
# file (GLOB INSTALL_FILES "../3party/mongoose/mongoose.*")
# install(FILES ${INSTALL_FILES} DESTINATION include/3party/mongoose)
#INSTALL( DIRECTORY ../3party/cpprest/Release/include DESTINATION include/3party/cpprest )
INSTALL( DIRECTORY ../3party/evpp/build-release/include DESTINATION include/3party/evpp )
INSTALL( DIRECTORY ../3party/rabbitmq DESTINATION include/3party )
# INSTALL( DIRECTORY ../3party/evpp/build-release/include DESTINATION include/3party/evpp )
# INSTALL( DIRECTORY ../3party/rabbitmq DESTINATION include/3party )
#INSTALL( DIRECTORY ../internals/include/Rabbitmq DESTINATION include/internals )
INSTALL( DIRECTORY /usr/include/hiredis DESTINATION include/3party )
INSTALL( DIRECTORY ../3party/flatbuffers/include DESTINATION include/3party/flatbuffers )
# INSTALL( DIRECTORY /usr/include/hiredis DESTINATION include/3party )
# INSTALL( DIRECTORY ../3party/flatbuffers/include DESTINATION include/3party/flatbuffers )
#CPack
include (InstallRequiredSystemLibraries)
......
......@@ -2,11 +2,28 @@
#FROM ubuntu-debootstrap:14.04
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
COPY ./target/*.tar.gz /home/develop/dist/
RUN cd /home/develop/dist && tar xzf *.tar.gz
RUN cmake . \
&& make \
&& 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
#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
......@@ -15,7 +32,7 @@ RUN cd /home/develop/dist && tar xzf *.tar.gz
#RUN echo kernel.shmmax=49249672960 >> /etc/sysctl.conf
#RUN echo kernel.shmall=10485760 >> /etc/sysctl.conf
EXPOSE 50010
#EXPOSE 50010
# ENTRYPOINT ["/bin/bash"]
......@@ -3,7 +3,7 @@ FROM municipalitybank.com:5050/mcx/devops/dev-cpp:vscode-gcc8
# install deb packages
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 apt-get update
......@@ -11,7 +11,7 @@ RUN /usr/install-deb-dependencies.sh
# Clean up APT when done.
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
# install vcpkg packages
USER vscode
......
## C++ Microservice Framework
* to create microservice docker run script/build_microservice_docker.sh [version]
## 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
- fix for IRequest->GetContent() in Evpp
# 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
echo "Installing vcpkg packages..."
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 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