Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.2.3 #6

Merged
merged 7 commits into from
Oct 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ tests/plugin_test
unittests/unit_test

doxygen
haya.doxygen
daobet.doxygen

wallet.json
witness_node_data_dir
Expand Down
30 changes: 15 additions & 15 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ publish-nomral:
- schedules
<<: *docker-login
script:
- docker build -f Docker/Dockerfile -t haya --build-arg registry=${REGISTRY} .
- docker tag haya ${REGISTRY}/haya:${CI_COMMIT_SHA:0:8}
- docker tag haya ${REGISTRY}/haya:${CI_COMMIT_REF_NAME}-latest
- docker tag haya ${REGISTRY}/haya:latest
- docker push ${REGISTRY}/haya
- docker build -f Docker/Dockerfile -t daobet --build-arg registry=${REGISTRY} .
- docker tag daobet ${REGISTRY}/daobet:${CI_COMMIT_SHA:0:8}
- docker tag daobet ${REGISTRY}/daobet:${CI_COMMIT_REF_NAME}-latest
- docker tag daobet ${REGISTRY}/daobet:latest
- docker push ${REGISTRY}/daobet

publish-dev:
stage: publish to gitlab registry dev
Expand All @@ -59,11 +59,11 @@ publish-dev:
- schedules
<<: *docker-login
script:
- docker build -f Docker/dev/Dockerfile -t haya-dev --build-arg registry=${REGISTRY} .
- docker tag haya-dev ${REGISTRY}/haya-dev:${CI_COMMIT_SHA:0:8}
- docker tag haya-dev ${REGISTRY}/haya-dev:${CI_COMMIT_REF_NAME}-latest
- docker tag haya-dev ${REGISTRY}/haya-dev:latest
- docker push ${REGISTRY}/haya-dev
- docker build -f Docker/dev/Dockerfile -t daobet-dev --build-arg registry=${REGISTRY} .
- docker tag daobet-dev ${REGISTRY}/daobet-dev:${CI_COMMIT_SHA:0:8}
- docker tag daobet-dev ${REGISTRY}/daobet-dev:${CI_COMMIT_REF_NAME}-latest
- docker tag daobet-dev ${REGISTRY}/daobet-dev:latest
- docker push ${REGISTRY}/daobet-dev

publish-builder:
stage: publish builder
Expand All @@ -85,8 +85,8 @@ publish-builder:
<<: *docker-login
script:
- cd Docker/builder
- docker build -t haya-builder .
- docker tag haya-builder ${REGISTRY}/haya-builder:${CI_COMMIT_SHA:0:8}
- docker tag haya-builder ${REGISTRY}/haya-builder:${CI_COMMIT_REF_NAME}-latest
- docker tag haya-builder ${REGISTRY}/haya-builder:latest
- docker push ${REGISTRY}/haya-builder
- docker build -t daobet-builder .
- docker tag daobet-builder ${REGISTRY}/daobet-builder:${CI_COMMIT_SHA:0:8}
- docker tag daobet-builder ${REGISTRY}/daobet-builder:${CI_COMMIT_REF_NAME}-latest
- docker tag daobet-builder ${REGISTRY}/daobet-builder:latest
- docker push ${REGISTRY}/daobet-builder
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ jobs:

- cp -r $HOME/.ccache .ccache #copy cache into build context
- docker build --build-arg registry=mixbytes --build-arg build_type=$BUILD_TYPE -t tmp-builder -f Docker/Dockerfile --target builder .
- docker run --rm -v $HOME/.ccache:/out tmp-builder /bin/bash -c "cp -r /haya/.ccache/* /out" #save updated cache
- docker build --build-arg registry=mixbytes --build-arg build_type=$BUILD_TYPE -t mixbytes/haya:$TRAVIS_BRANCH -f Docker/Dockerfile . #build main image
- docker run --rm -v $HOME/.ccache:/out tmp-builder /bin/bash -c "cp -r /daobet/.ccache/* /out" #save updated cache
- docker build --build-arg registry=mixbytes --build-arg build_type=$BUILD_TYPE -t mixbytes/daobet:$TRAVIS_BRANCH -f Docker/Dockerfile . #build main image

- if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ $BUILD_TYPE != "Debug" ]; then docker run tmp-builder /bin/bash -c 'cd /tmp/build && ctest -R "simulator|unit_test"'; fi
- if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ $BUILD_TYPE != "Debug" ]; then docker run tmp-builder /bin/bash -c 'cd /tmp/build && ctest -R "simulator|unit_test|nodeos_sanity|nodeos_run" -E "mongo"'; fi

- docker push mixbytes/haya:$TRAVIS_BRANCH #push main image to registry
- docker push mixbytes/daobet:$TRAVIS_BRANCH #push main image to registry
- |
if [ $TRAVIS_BRANCH == "master" ]; then
docker tag mixbytes/haya:master mixbytes/haya:latest
docker push mixbytes/haya:latest
docker tag mixbytes/daobet:master mixbytes/daobet:latest
docker push mixbytes/daobet:latest
fi

66 changes: 33 additions & 33 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required( VERSION 3.5 )

project( HAYA )
project( DAOBET )

enable_testing()

Expand All @@ -12,8 +12,8 @@ if(CCACHE_FOUND)
endif(CCACHE_FOUND)

if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
message(WARNING "CMAKE_INSTALL_PREFIX is set to default path of ${CMAKE_INSTALL_PREFIX}, resetting to ${CMAKE_INSTALL_PREFIX}/haya")
set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/haya")
message(WARNING "CMAKE_INSTALL_PREFIX is set to default path of ${CMAKE_INSTALL_PREFIX}, resetting to ${CMAKE_INSTALL_PREFIX}/daobet")
set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/daobet")
elseif ("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
message(WARNING "CMAKE_INSTALL_PREFIX is explicitly set to /usr/local. This is not recommended.")
endif()
Expand Down Expand Up @@ -46,10 +46,10 @@ else()
set(VERSION_FULL "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
endif()

set( CLI_CLIENT_EXECUTABLE_NAME haya-cli )
set( NODE_EXECUTABLE_NAME haya-node )
set( KEY_STORE_EXECUTABLE_NAME haya-wallet )
set( GUI_CLIENT_EXECUTABLE_NAME haya )
set( CLI_CLIENT_EXECUTABLE_NAME daobet-cli )
set( NODE_EXECUTABLE_NAME daobet-node )
set( KEY_STORE_EXECUTABLE_NAME daobet-wallet )
set( GUI_CLIENT_EXECUTABLE_NAME daobet )
set( CUSTOM_URL_SCHEME "gcs" )
set( INSTALLER_APP_ID "68ad7005-8eee-49c9-95ce-9eed97e5b347" )

Expand Down Expand Up @@ -236,48 +236,48 @@ add_subdirectory( tools )
add_subdirectory( debian )
add_subdirectory( simulator )

install_directory_permissions(DIRECTORY ${CMAKE_INSTALL_FULL_SYSCONFDIR}/haya)
install_directory_permissions(DIRECTORY ${CMAKE_INSTALL_FULL_SYSCONFDIR}/daobet)

install(FILES testnet.template DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/haya/launcher)
install_directory_permissions(DIRECTORY ${CMAKE_INSTALL_FULL_SYSCONFDIR}/haya)
install_directory_permissions(DIRECTORY ${CMAKE_INSTALL_FULL_SYSCONFDIR}/haya/launcher)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/testnet.template ${CMAKE_CURRENT_BINARY_DIR}/etc/haya/launcher/testnet.template COPYONLY)
install(FILES testnet.template DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/daobet/launcher)
install_directory_permissions(DIRECTORY ${CMAKE_INSTALL_FULL_SYSCONFDIR}/daobet)
install_directory_permissions(DIRECTORY ${CMAKE_INSTALL_FULL_SYSCONFDIR}/daobet/launcher)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/testnet.template ${CMAKE_CURRENT_BINARY_DIR}/etc/daobet/launcher/testnet.template COPYONLY)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/haya.version.in ${CMAKE_CURRENT_BINARY_DIR}/haya.version.hpp)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/haya.version.hpp DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/daobet.version.in ${CMAKE_CURRENT_BINARY_DIR}/daobet.version.hpp)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/daobet.version.hpp DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR})

set(EOS_ROOT_DIR ${CMAKE_BINARY_DIR})
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/eosio-config.cmake.in ${CMAKE_BINARY_DIR}/lib/cmake/haya/eosio-config.cmake @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/EosioTesterBuild.cmake.in ${CMAKE_BINARY_DIR}/lib/cmake/haya/EosioTester.cmake @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/eosio-config.cmake.in ${CMAKE_BINARY_DIR}/lib/cmake/daobet/eosio-config.cmake @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/EosioTesterBuild.cmake.in ${CMAKE_BINARY_DIR}/lib/cmake/daobet/EosioTester.cmake @ONLY)

set(EOS_ROOT_DIR ${CMAKE_INSTALL_PREFIX})
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/eosio-config.cmake.in ${CMAKE_BINARY_DIR}/modules/eosio-config.cmake @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/modules/eosio-config.cmake DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/haya)
install(FILES ${CMAKE_BINARY_DIR}/modules/eosio-config.cmake DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/daobet)
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/EosioTester.cmake.in ${CMAKE_BINARY_DIR}/modules/EosioTester.cmake @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/modules/EosioTester.cmake DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/haya)
install(FILES ${CMAKE_BINARY_DIR}/modules/EosioTester.cmake DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/daobet)

configure_file(${CMAKE_SOURCE_DIR}/LICENSE
${CMAKE_BINARY_DIR}/licenses/haya/LICENSE COPYONLY)
${CMAKE_BINARY_DIR}/licenses/daobet/LICENSE COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/wabt/LICENSE
${CMAKE_BINARY_DIR}/licenses/haya/LICENSE.wabt COPYONLY)
${CMAKE_BINARY_DIR}/licenses/daobet/LICENSE.wabt COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/softfloat/COPYING.txt
${CMAKE_BINARY_DIR}/licenses/haya/LICENSE.softfloat COPYONLY)
${CMAKE_BINARY_DIR}/licenses/daobet/LICENSE.softfloat COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/wasm-jit/LICENSE
${CMAKE_BINARY_DIR}/licenses/haya/LICENSE.wavm COPYONLY)
${CMAKE_BINARY_DIR}/licenses/daobet/LICENSE.wavm COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/fc/secp256k1/upstream/COPYING
${CMAKE_BINARY_DIR}/licenses/haya/LICENSE.secp256k1 COPYONLY)
${CMAKE_BINARY_DIR}/licenses/daobet/LICENSE.secp256k1 COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/fc/src/network/LICENSE.go
${CMAKE_BINARY_DIR}/licenses/haya/LICENSE.go COPYONLY)
${CMAKE_BINARY_DIR}/licenses/daobet/LICENSE.go COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/yubihsm/LICENSE
${CMAKE_BINARY_DIR}/licenses/haya/LICENSE.yubihsm COPYONLY)

install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/haya/ COMPONENT base)
install(FILES libraries/wabt/LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/haya/ RENAME LICENSE.wabt COMPONENT base)
install(FILES libraries/softfloat/COPYING.txt DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/haya/ RENAME LICENSE.softfloat COMPONENT base)
install(FILES libraries/wasm-jit/LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/haya/ RENAME LICENSE.wavm COMPONENT base)
install(FILES libraries/fc/secp256k1/upstream/COPYING DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/haya/ RENAME LICENSE.secp256k1 COMPONENT base)
install(FILES libraries/fc/src/network/LICENSE.go DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/haya/ COMPONENT base)
install(FILES libraries/yubihsm/LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/haya/ RENAME LICENSE.yubihsm COMPONENT base)
${CMAKE_BINARY_DIR}/licenses/daobet/LICENSE.yubihsm COPYONLY)

install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/daobet/ COMPONENT base)
install(FILES libraries/wabt/LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/daobet/ RENAME LICENSE.wabt COMPONENT base)
install(FILES libraries/softfloat/COPYING.txt DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/daobet/ RENAME LICENSE.softfloat COMPONENT base)
install(FILES libraries/wasm-jit/LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/daobet/ RENAME LICENSE.wavm COMPONENT base)
install(FILES libraries/fc/secp256k1/upstream/COPYING DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/daobet/ RENAME LICENSE.secp256k1 COMPONENT base)
install(FILES libraries/fc/src/network/LICENSE.go DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/daobet/ COMPONENT base)
install(FILES libraries/yubihsm/LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/daobet/ RENAME LICENSE.yubihsm COMPONENT base)

add_custom_target(base-install
COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}"
Expand Down
2 changes: 1 addition & 1 deletion CMakeModules/additionalPlugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ foreach(ADDITIONAL_PLUGIN_SOURCE_DIR ${EOSIO_ADDITIONAL_PLUGINS})
endforeach()

foreach(ADDITIONAL_PLUGIN_TARGET ${ADDITIONAL_PLUGINS_TARGET})
target_link_libraries( haya-node PRIVATE -Wl,${whole_archive_flag} ${ADDITIONAL_PLUGIN_TARGET} -Wl,${no_whole_archive_flag} )
target_link_libraries( daobet-node PRIVATE -Wl,${whole_archive_flag} ${ADDITIONAL_PLUGIN_TARGET} -Wl,${no_whole_archive_flag} )
endforeach()
4 changes: 2 additions & 2 deletions CMakeModules/doxygen.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configure_file("haya.doxygen.in" "${CMAKE_BINARY_DIR}/haya.doxygen")
configure_file("daobet.doxygen.in" "${CMAKE_BINARY_DIR}/daobet.doxygen")

include(FindDoxygen)

Expand All @@ -20,7 +20,7 @@ else()
# Doxygen has issues making destination directories more than one level deep, so do it for it.
add_custom_target(make_doc_dir ALL COMMAND ${CMAKE_COMMAND} -E make_directory "${DOXY_DOC_DEST_DIR}")
add_custom_target(contract_documentation ALL
COMMAND "${DOXYGEN_EXECUTABLE}" "${CMAKE_BINARY_DIR}/haya.doxygen"
COMMAND "${DOXYGEN_EXECUTABLE}" "${CMAKE_BINARY_DIR}/daobet.doxygen"
DEPENDS make_doc_dir
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
COMMENT "Building doxygen documentation into ${DOXY_DOC_DEST_DIR}..."
Expand Down
2 changes: 1 addition & 1 deletion CMakeModules/installer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ else()
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY TRUE)
set(CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION TRUE)
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/mixbytes/haya")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/mixbytes/daobet")
endif()

include(CPack)
4 changes: 2 additions & 2 deletions CMakeModules/package.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(VENDOR "mixbytes")
set(PROJECT_NAME "haya")
set(PROJECT_NAME "daobet")
set(DESC "blockchain software")
set(URL "https://github.com/mixbytes/haya")
set(URL "https://github.com/DaoCasino/DAObet")
set(EMAIL "hello@mixbytes.io")

configure_file(${CMAKE_SOURCE_DIR}/scripts/generate_package.sh.in ${CMAKE_BINARY_DIR}/packages/generate_package.sh @ONLY)
Expand Down
22 changes: 11 additions & 11 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ ARG build_type

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install ccache

ADD . haya
WORKDIR haya
ENV CCACHE_DIR /haya/.ccache
ADD . daobet
WORKDIR daobet
ENV CCACHE_DIR /daobet/.ccache

RUN git submodule init && git submodule update --init --recursive

RUN echo "$(git rev-parse --abbrev-ref HEAD):$(git rev-parse HEAD)" > /etc/haya-version \
RUN echo "$(git rev-parse --abbrev-ref HEAD):$(git rev-parse HEAD)" > /etc/daobet-version \
&& cmake -H. -B"/tmp/build" -GNinja -DCMAKE_BUILD_TYPE=${build_type} -DWASM_ROOT=/opt/wasm -DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX=/tmp/build -DBUILD_MONGO_DB_PLUGIN=true -DCORE_SYMBOL_NAME=$symbol \
-DENABLE_TX_SPONSORSHIP=1 \
Expand All @@ -22,12 +22,12 @@ FROM ubuntu:18.04

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install openssl ca-certificates libcurl4-openssl-dev libusb-1.0 gdb && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/lib/* /usr/local/lib/
COPY --from=builder /tmp/build/bin /opt/haya/bin
COPY --from=builder /haya/Docker/config.ini /
COPY --from=builder /etc/haya-version /etc
COPY --from=builder /haya/Docker/haya-node.sh /opt/haya/bin/haya-node.sh
ENV EOSIO_ROOT=/opt/haya
RUN chmod +x /opt/haya/bin/haya-node.sh
COPY --from=builder /tmp/build/bin /opt/daobet/bin
COPY --from=builder /daobet/Docker/config.ini /
COPY --from=builder /etc/daobet-version /etc
COPY --from=builder /daobet/Docker/daobet-node.sh /opt/daobet/bin/daobet-node.sh
ENV EOSIO_ROOT=/opt/daobet
RUN chmod +x /opt/daobet/bin/daobet-node.sh
RUN ulimit -c unlimited
ENV LD_LIBRARY_PATH /usr/local/lib
ENV PATH /opt/haya/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV PATH /opt/daobet/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
File renamed without changes.
37 changes: 37 additions & 0 deletions Docker/daobet-node.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh
cd /opt/daobet/bin

if [ ! -d "/opt/daobet/bin/data-dir" ]; then
mkdir /opt/daobet/bin/data-dir
fi

if [ -f '/opt/daobet/bin/data-dir/config.ini' ]; then
echo
else
cp /config.ini /opt/daobet/bin/data-dir
fi

if [ -d '/opt/daobet/bin/data-dir/contracts' ]; then
echo
else
cp -r /contracts /opt/daobet/bin/data-dir
fi

while :; do
case $1 in
--config-dir=?*)
CONFIG_DIR=${1#*=}
;;
*)
break
esac
shift
done

if [ ! "$CONFIG_DIR" ]; then
CONFIG_DIR="--config-dir=/opt/daobet/bin/data-dir"
else
CONFIG_DIR=""
fi

exec /opt/daobet/bin/daobet-node $CONFIG_DIR "$@"
20 changes: 10 additions & 10 deletions Docker/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ ARG registry
FROM ${registry}/haya:latest-builder as builder
ARG symbol=SYS

ADD . haya
WORKDIR haya
ADD . daobet
WORKDIR daobet

RUN git submodule init && git submodule update --init --recursive

RUN echo "$(git rev-parse --abbrev-ref HEAD):$(git rev-parse HEAD)" > /etc/haya-version \
&& cmake -H. -B"/opt/haya" -GNinja -DCMAKE_BUILD_TYPE=Release -DWASM_ROOT=/opt/wasm -DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX=/opt/haya -DBUILD_MONGO_DB_PLUGIN=true -DCORE_SYMBOL_NAME=$symbol \
&& cmake --build /opt/haya --target install \
&& cp /haya/Docker/config.ini / && ln -s /opt/haya/contracts /contracts && cp /haya/Docker/nodeosd.sh /opt/haya/bin/nodeosd.sh && ln -s /haya/tutorials /tutorials
RUN echo "$(git rev-parse --abbrev-ref HEAD):$(git rev-parse HEAD)" > /etc/daobet-version \
&& cmake -H. -B"/opt/daobet" -GNinja -DCMAKE_BUILD_TYPE=Release -DWASM_ROOT=/opt/wasm -DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX=/opt/daobet -DBUILD_MONGO_DB_PLUGIN=true -DCORE_SYMBOL_NAME=$symbol \
&& cmake --build /opt/daobet --target install \
&& cp /daobet/Docker/config.ini / && ln -s /opt/daobet/contracts /contracts && cp /daobet/Docker/nodeosd.sh /opt/daobet/bin/nodeosd.sh && ln -s /daobet/tutorials /tutorials

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install openssl ca-certificates vim psmisc python3-pip libcurl4-openssl-dev libusb-1.0 && rm -rf /var/lib/apt/lists/*
RUN pip3 install numpy
ENV EOSIO_ROOT=/opt/haya
RUN chmod +x /opt/haya/bin/nodeosd.sh
ENV EOSIO_ROOT=/opt/daobet
RUN chmod +x /opt/daobet/bin/nodeosd.sh
ENV LD_LIBRARY_PATH /usr/local/lib
ENV PATH /opt/haya/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV PATH /opt/daobet/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
12 changes: 6 additions & 6 deletions Docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@ services:
nodeosd:
build:
context: .
image: registry.gitlab.com/cyberos/infrastructure/haya:latest
command: /opt/haya/bin/haya-node.sh --data-dir /opt/haya/bin/data-dir -e --http-alias=nodeosd:8888 --http-alias=127.0.0.1:8888 --http-alias=localhost:8888
image: registry.gitlab.com/cyberos/infrastructure/daobet:latest
command: /opt/daobet/bin/daobet-node.sh --data-dir /opt/daobet/bin/data-dir -e --http-alias=nodeosd:8888 --http-alias=127.0.0.1:8888 --http-alias=localhost:8888
hostname: nodeosd
ports:
- 8888:8888
- 9876:9876
expose:
- "8888"
volumes:
- nodeos-data-volume:/opt/haya/bin/data-dir
- nodeos-data-volume:/opt/daobet/bin/data-dir
cap_add:
- IPC_LOCK
stop_grace_period: 10m

keosd:
image: registry.gitlab.com/cyberos/infrastructure/haya:latest
command: /opt/haya/bin/haya-wallet --wallet-dir /opt/haya/bin/data-dir --http-server-address=127.0.0.1:8900 --http-alias=keosd:8900 --http-alias=localhost:8900
image: registry.gitlab.com/cyberos/infrastructure/daobet:latest
command: /opt/daobet/bin/daobet-wallet --wallet-dir /opt/daobet/bin/data-dir --http-server-address=127.0.0.1:8900 --http-alias=keosd:8900 --http-alias=localhost:8900
hostname: keosd
links:
- nodeosd
volumes:
- keosd-data-volume:/opt/haya/bin/data-dir
- keosd-data-volume:/opt/daobet/bin/data-dir
stop_grace_period: 10m

volumes:
Expand Down
Loading