diff --git a/services/backup/docker-server/contents/server/CMakeLists.txt b/services/backup/docker-server/contents/server/CMakeLists.txt --- a/services/backup/docker-server/contents/server/CMakeLists.txt +++ b/services/backup/docker-server/contents/server/CMakeLists.txt @@ -28,24 +28,11 @@ endif() file(GLOB GENERATED_CODE "./_generated/*.cc") -set(DEV_SOURCE_CODE "") -set(DEV_HEADERS_PATH "") if ($ENV{COMM_SERVICES_DEV_MODE} MATCHES 1) add_compile_definitions(COMM_SERVICES_DEV_MODE) - file(GLOB DEV_SOURCE_CODE "./dev/*.cpp" "./src/*.dev.cpp") - set(DEV_HEADERS_PATH "./dev") endif() file(GLOB SOURCE_CODE "./src/*.cpp" "./src/**/*.cpp") -list(FILTER SOURCE_CODE EXCLUDE REGEX ".*.dev.cpp$") - -foreach (ITEM ${DEV_SOURCE_CODE}) - string(REPLACE "/" ";" SPLIT_ITEM ${ITEM}) - list(GET SPLIT_ITEM -1 FILE_FULL_NAME) - string(REPLACE ".dev.cpp" ".cpp" FILE_NAME ${FILE_FULL_NAME}) - list(FILTER SOURCE_CODE EXCLUDE REGEX ".*${FILE_NAME}$") - list(APPEND SOURCE_CODE "${ITEM}") -endforeach() include_directories( ./src @@ -55,7 +42,6 @@ ${FOLLY_INCLUDES} ./lib/double-conversion ${Boost_INCLUDE_DIR} - ${DEV_HEADERS_PATH} ) # SERVER diff --git a/services/backup/docker-server/contents/server/src/AwsTools.cpp b/services/backup/docker-server/contents/server/src/AwsTools.cpp --- a/services/backup/docker-server/contents/server/src/AwsTools.cpp +++ b/services/backup/docker-server/contents/server/src/AwsTools.cpp @@ -7,6 +7,10 @@ std::unique_ptr getDynamoDBClient() { Aws::Client::ClientConfiguration config; config.region = AWS_REGION; +#ifdef COMM_SERVICES_DEV_MODE + config.endpointOverride = Aws::String("localstack:4566"); + config.scheme = Aws::Http::Scheme::HTTP; +#endif return std::make_unique(config); } diff --git a/services/backup/docker-server/contents/server/src/DatabaseManager.h b/services/backup/docker-server/contents/server/src/DatabaseManager.h --- a/services/backup/docker-server/contents/server/src/DatabaseManager.h +++ b/services/backup/docker-server/contents/server/src/DatabaseManager.h @@ -11,19 +11,12 @@ #include #include -#ifdef COMM_SERVICES_DEV_MODE -#include "DatabaseSimulator.h" -#endif - namespace comm { namespace network { namespace database { // this class should be thread-safe in case any shared resources appear class DatabaseManager { -#ifdef COMM_SERVICES_DEV_MODE - DatabaseSimulator dbSimulator; -#endif void innerPutItem( std::shared_ptr item, diff --git a/services/docker-compose.yml b/services/docker-compose.yml --- a/services/docker-compose.yml +++ b/services/docker-compose.yml @@ -36,6 +36,8 @@ - "${COMM_SERVICES_PORT_BACKUP}:50051" volumes: - $HOME/.aws/credentials:/root/.aws/credentials:ro + networks: + - services-net # blob blob-base: build: