From c10df0e70352d5269e33576acf64f8f373811657 Mon Sep 17 00:00:00 2001 From: Samuel-Wamala Date: Thu, 27 Jan 2022 18:29:41 +0300 Subject: [PATCH 1/2] Upated debian dockerfile --- Debian.Dockerfile | 31 +++++++++++++++++-------------- docker/docker-compose-debian.yaml | 5 +++-- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Debian.Dockerfile b/Debian.Dockerfile index f0ebe9cb4..9e4c1f283 100644 --- a/Debian.Dockerfile +++ b/Debian.Dockerfile @@ -5,20 +5,6 @@ MAINTAINER OriginTrail LABEL maintainer="OriginTrail" ENV NODE_ENV=testnet -#Install git, nodejs,python -RUN apt-get -qq update && apt-get -qq -y install curl -RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - -RUN apt-get -qq update -RUN apt-get -qq -y install wget apt-transport-https -RUN apt-get -qq -y install git nodejs -RUN apt-get -qq -y install make python - -#Install Papertrail -RUN wget https://github.com/papertrail/remote_syslog2/releases/download/v0.20/remote_syslog_linux_amd64.tar.gz -RUN tar xzf ./remote_syslog_linux_amd64.tar.gz && cd remote_syslog && cp ./remote_syslog /usr/local/bin -COPY config/papertrail.yml /etc/log_files.yml - - #Mysql-server installation @@ -38,6 +24,23 @@ RUN { \ && apt-get update && apt-get install -y default-mysql-server default-mysql-server-core +#Install git, nodejs,python +RUN apt-get -qq update && apt-get -qq -y install curl +RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - +RUN apt-get -qq update +RUN apt-get -qq -y install wget apt-transport-https +RUN apt-get -qq -y install git nodejs +RUN apt-get -qq -y install make python + +#Install Papertrail +RUN wget https://github.com/papertrail/remote_syslog2/releases/download/v0.20/remote_syslog_linux_amd64.tar.gz +RUN tar xzf ./remote_syslog_linux_amd64.tar.gz && cd remote_syslog && cp ./remote_syslog /usr/local/bin +COPY config/papertrail.yml /etc/log_files.yml + + + + + #Install nodemon & forever RUN npm install forever -g diff --git a/docker/docker-compose-debian.yaml b/docker/docker-compose-debian.yaml index a578d3768..13ca7fdb5 100644 --- a/docker/docker-compose-debian.yaml +++ b/docker/docker-compose-debian.yaml @@ -6,8 +6,9 @@ services: network_mode: host ot-node: - container_name: ot-node - image: origintrail/ot-node:v6.0.0-beta.1-debian + build: + context: . + dockerfile: Debian.Dockerfile depends_on: - graphdb expose: From 554a5f71ec9f16a311bfda2fc32ddfb945207f38 Mon Sep 17 00:00:00 2001 From: Samuel-Wamala Date: Thu, 27 Jan 2022 18:37:31 +0300 Subject: [PATCH 2/2] removed Debian Build --- Debian.Dockerfile | 60 ------------------------------- docker/docker-compose-debian.yaml | 26 -------------- docker/docker-compose-ubuntu.yaml | 1 + 3 files changed, 1 insertion(+), 86 deletions(-) delete mode 100644 Debian.Dockerfile delete mode 100644 docker/docker-compose-debian.yaml diff --git a/Debian.Dockerfile b/Debian.Dockerfile deleted file mode 100644 index 9e4c1f283..000000000 --- a/Debian.Dockerfile +++ /dev/null @@ -1,60 +0,0 @@ -#base image -FROM debian:bullseye - -MAINTAINER OriginTrail -LABEL maintainer="OriginTrail" -ENV NODE_ENV=testnet - - -#Mysql-server installation - -ARG DEBIAN_FRONTEND=noninteractive -ARG PASSWORD=password -RUN apt-get install -y lsb-release -RUN apt-get install -y wget gnupg curl -RUN curl -LO https://dev.mysql.com/get/mysql-apt-config_0.8.20-1_all.deb -RUN dpkg -i ./mysql-apt-config_0.8.20-1_all.deb -RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 - - -RUN { \ - echo mysql-server mysql-server/root_password password $PASSWORD ''; \ - echo mysql-server mysql-server/root_password_again password $PASSWORD ''; \ -} | debconf-set-selections \ - && apt-get update && apt-get install -y default-mysql-server default-mysql-server-core - - -#Install git, nodejs,python -RUN apt-get -qq update && apt-get -qq -y install curl -RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - -RUN apt-get -qq update -RUN apt-get -qq -y install wget apt-transport-https -RUN apt-get -qq -y install git nodejs -RUN apt-get -qq -y install make python - -#Install Papertrail -RUN wget https://github.com/papertrail/remote_syslog2/releases/download/v0.20/remote_syslog_linux_amd64.tar.gz -RUN tar xzf ./remote_syslog_linux_amd64.tar.gz && cd remote_syslog && cp ./remote_syslog /usr/local/bin -COPY config/papertrail.yml /etc/log_files.yml - - - - - - -#Install nodemon & forever -RUN npm install forever -g - - - - -WORKDIR /ot-node - -COPY . . - -#Install nppm -RUN npm install - -#Mysql intialization -RUN service mariadb start && mysql -u root -e "CREATE DATABASE operationaldb /*\!40100 DEFAULT CHARACTER SET utf8 */; SET PASSWORD FOR root@localhost = PASSWORD(''); FLUSH PRIVILEGES;" && npx sequelize --config=./config/sequelizeConfig.js db:migrate - diff --git a/docker/docker-compose-debian.yaml b/docker/docker-compose-debian.yaml deleted file mode 100644 index 13ca7fdb5..000000000 --- a/docker/docker-compose-debian.yaml +++ /dev/null @@ -1,26 +0,0 @@ -version: '3.8' -services: - graphdb: - container_name: graphdb - image: khaller/graphdb-free:latest - network_mode: host - - ot-node: - build: - context: . - dockerfile: Debian.Dockerfile - depends_on: - - graphdb - expose: - - 8900 - - 9000 - command: > - bash -c " - service mariadb start && - forever index.js - " - volumes: - - ${PWD}/.origintrail_noderc:/ot-node/.origintrail_noderc - - ~/certs/:/root/certs/ - network_mode: host - diff --git a/docker/docker-compose-ubuntu.yaml b/docker/docker-compose-ubuntu.yaml index e1380f597..0bf68bbd1 100644 --- a/docker/docker-compose-ubuntu.yaml +++ b/docker/docker-compose-ubuntu.yaml @@ -15,6 +15,7 @@ services: - 9000 command: > bash -c " + /bin/sleep 35 service mysql restart && forever index.js "