Skip to content
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ plsa-service/plsa/_plsa.c
service_spec/__pycache__/
service_spec/topic_analysis_pb2.py
service_spec/topic_analysis_pb2_grpc.py
Docker/daemons/*.*
16 changes: 14 additions & 2 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ RUN mkdir /home/top/pay/ \
/home/top/daemons/kovan/ \
/home/top/daemons/ropsten/ \
/home/top/daemons/mainnet/ \
/home/top/daemons/mainnet_2/ \
/home/top/dep/ \
/home/top/dep/appData/ \
/home/top/dep/appData/plsa/ \
Expand All @@ -86,18 +87,29 @@ RUN wget -O snet-daemon.tar.gz https://github.com/singnet/snet-daemon/releases/d
tar --strip-components=1 -xzf snet-daemon.tar.gz && \
cp snetd /home/top/daemons/kovan/ && \
cp snetd /home/top/daemons/ropsten/ && \
cp snetd /home/top/daemons/mainnet/
cp snetd /home/top/daemons/mainnet/ && \
rm -r snet-daemon.tar.gz && \
rm snetd


ENV DAEMON_VERSION_2 2.0.2

RUN wget -O snet-daemon.tar.gz https://github.com/singnet/snet-daemon/releases/download/v$DAEMON_VERSION_2/snet-daemon-v$DAEMON_VERSION_2-linux-amd64.tar.gz && \
tar --strip-components=1 -xzf snet-daemon.tar.gz && \
cp snetd /home/top/daemons/mainnet_2/


RUN echo 37

COPY daemons/snetd_topic_kovan.json /home/top/daemons/kovan/
COPY daemons/snetd_topic_ropsten.json /home/top/daemons/ropsten/
COPY daemons/snetd_topic_mainnet.json /home/top/daemons/mainnet/
COPY daemons/snetd_topic_mainnet_2.json /home/top/daemons/mainnet_2/
COPY gunicorn/config.py /home/top/gunicorn/
COPY supervisor/kovand.conf /etc/supervisor/conf.d/
#COPY supervisor/kovand.conf /etc/supervisor/conf.d/
COPY supervisor/ropstend.conf /etc/supervisor/conf.d/
COPY supervisor/mainnetd.conf /etc/supervisor/conf.d/
COPY supervisor/mainnetd_2.conf /etc/supervisor/conf.d/
COPY supervisor/topic_grpc.conf /etc/supervisor/conf.d/
COPY supervisor/topic_rest.conf /etc/supervisor/conf.d/
COPY supervisor/supervisord.conf /etc/supervisor/
Expand Down
33 changes: 33 additions & 0 deletions Docker/daemons/snetd_topic_kovan.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"DAEMON_END_POINT": "0.0.0.0:2300",
"ETHEREUM_JSON_RPC_ENDPOINT": "https://kovan.infura.io",
"IPFS_END_POINT": "http://ipfs.singularitynet.io:80",
"REGISTRY_ADDRESS_KEY": "0xe331bf20044a5b24c1a744abc90c1fd711d2c08d",
"PASSTHROUGH_ENABLED": true,
"PASSTHROUGH_ENDPOINT": "http://127.0.0.1:5000",
"ORGANIZATION_ID": "snet",
"SERVICE_ID": "topic-analysis",
"ssl_cert": "/etc/letsencrypt/live/tz-services-1.snet.sh/fullchain.pem",
"ssl_key": "/etc/letsencrypt/live/tz-services-1.snet.sh/privkey.pem",
"PAYMENT_CHANNEL_STORAGE_SERVER": {
"id":"st1",
"host" : "127.0.0.1",
"client_port": 2379,
"peer_port": 2380,
"token": "unique-token",
"enabled": true,
"cluster": "st1=http://127.0.0.1:2380",
"DATA_DIR": "/home/top/pay/kovan/"
},
"payment_channel_storage_client": {
"connection_timeout": "5s",
"request_timeout": "3s",
"endpoints": ["http://127.0.0.1:2379"]
},
"LOG": {
"LEVEL": "debug",
"OUTPUT": {
"TYPE": "stdout"
}
}
}
33 changes: 33 additions & 0 deletions Docker/daemons/snetd_topic_mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"DAEMON_END_POINT": "0.0.0.0:2333",
"ETHEREUM_JSON_RPC_ENDPOINT": "https://mainnet.infura.io",
"IPFS_END_POINT": "http://ipfs.singularitynet.io:80",
"REGISTRY_ADDRESS_KEY": "0xb3180a92e210b45e3447976a412ac0df859febaf",
"PASSTHROUGH_ENABLED": true,
"PASSTHROUGH_ENDPOINT": "http://127.0.0.1:5000",
"ORGANIZATION_ID": "snet",
"SERVICE_ID": "topic-analysis",
"ssl_cert": "/etc/letsencrypt/live/tz-services-1.snet.sh/fullchain.pem",
"ssl_key": "/etc/letsencrypt/live/tz-services-1.snet.sh/privkey.pem",
"PAYMENT_CHANNEL_STORAGE_SERVER": {
"id":"st3",
"host" : "127.0.0.1",
"client_port": 2399,
"peer_port": 2390,
"token": "unique-token",
"enabled": true,
"cluster": "st3=http://127.0.0.1:2390",
"DATA_DIR": "/home/top/pay/mainnet/"
},
"payment_channel_storage_client": {
"connection_timeout": "5s",
"request_timeout": "3s",
"endpoints": ["http://127.0.0.1:2399"]
},
"LOG": {
"LEVEL": "debug",
"OUTPUT": {
"TYPE": "stdout"
}
}
}
23 changes: 23 additions & 0 deletions Docker/daemons/snetd_topic_mainnet_2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"DAEMON_END_POINT": "0.0.0.0:2300",
"IPFS_END_POINT": "http://ipfs.singularitynet.io:80",
"PASSTHROUGH_ENABLED": true,
"PASSTHROUGH_ENDPOINT": "http://127.0.0.1:5000",
"ORGANIZATION_ID": "snet",
"SERVICE_ID": "topic-analysis",
"ssl_cert": "/etc/letsencrypt/live/tz-services-1.snet.sh/fullchain.pem",
"ssl_key": "/etc/letsencrypt/live/tz-services-1.snet.sh/privkey.pem",
"payent_channel_cert_path": "/home/top/ssl/client.pem",
"payent_channel_ca_path": "/home/top/ssl/ca.pem",
"payent_channel_key_path": "/home/top/ssl/client-key.pem",
"free_call_signer_address":"0x3Bb9b2499c283cec176e7C707Ecb495B7a961ebf",
"blockchain_network_selected": "main",
"metering_end_point": "https://mainnet-marketplace.singularitynet.io/metering",
"pvt_key_for_metering": "12d4f860df6466c2f0b5619176134b17a26c90989d1bf2d4a110d42028422cd6",
"LOG": {
"LEVEL": "debug",
"OUTPUT": {
"TYPE": "stdout"
}
}
}
33 changes: 33 additions & 0 deletions Docker/daemons/snetd_topic_ropsten.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"DAEMON_END_POINT": "0.0.0.0:2301",
"ETHEREUM_JSON_RPC_ENDPOINT": "https://ropsten.infura.io",
"IPFS_END_POINT": "http://ipfs.singularitynet.io:80",
"REGISTRY_ADDRESS_KEY": "0x5156fde2ca71da4398f8c76763c41bc9633875e4",
"PASSTHROUGH_ENABLED": true,
"PASSTHROUGH_ENDPOINT": "http://127.0.0.1:5000",
"ORGANIZATION_ID": "snet",
"SERVICE_ID": "topic-analysis",
"ssl_cert": "/etc/letsencrypt/live/tz-services-1.snet.sh/fullchain.pem",
"ssl_key": "/etc/letsencrypt/live/tz-services-1.snet.sh/privkey.pem",
"PAYMENT_CHANNEL_STORAGE_SERVER": {
"id":"st2",
"host" : "127.0.0.1",
"client_port": 2387,
"peer_port": 2388,
"token": "unique-token",
"enabled": true,
"cluster": "st2=http://127.0.0.1:2388",
"DATA_DIR": "/home/top/pay/ropsten/"
},
"payment_channel_storage_client": {
"connection_timeout": "5s",
"request_timeout": "3s",
"endpoints": ["http://127.0.0.1:2387"]
},
"LOG": {
"LEVEL": "debug",
"OUTPUT": {
"TYPE": "stdout"
}
}
}
20 changes: 20 additions & 0 deletions Docker/supervisor/mainnetd_2.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[supervisord]
logfile=/dev/null
nodaemon=true

[program:mainnetd_2]
command=/home/top/daemons/mainnet_2/snetd serve --config /home/top/daemons/mainnet_2/snetd_topic_mainnet_2.json
;directory=/home/top/daemons/mainnet
user=root
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
;stderr_logfile=/var/log/mainnet/err.log
;stdout_logfile=/var/log/mainnet/out.log
;redirect_stderr=true
;stdout_logfile_maxbytes=10MB
;stdout_logfile_backups=100
;stderr_logfile_maxbytes=10MB
;stderr_logfile_backups=100