-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from SatoshiPortal/releases/v0.5.0
Releases/v0.5.0
- Loading branch information
Showing
5 changed files
with
85 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"LOG": "DEBUG", | ||
"BASE_DIR": "/batcher", | ||
"DATA_DIR": "data", | ||
"DB_NAME": "batcher.sqlite", | ||
"URL_SERVER": "http://batcher", | ||
"URL_PORT": 8000, | ||
"URL_CTX_WEBHOOKS": "webhooks", | ||
"SESSION_TIMEOUT": 600, | ||
"CN_URL": "https://gatekeeper:2009/v0", | ||
"CN_API_ID": "003", | ||
"CN_API_KEY": "39b83c35972aeb81a242bfe189dc0a22da5ac6cbb64072b492f2d46519a97618", | ||
"DEFAULT_BATCHER_ID": 1, | ||
"BATCH_TIMEOUT_MINUTES": 60, | ||
"CHECK_THRESHOLD_MINUTES": 10, | ||
"BATCH_THRESHOLD_AMOUNT": 0.5, | ||
"BATCH_CONF_TARGET": 6 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
version: "3" | ||
|
||
services: | ||
batcher: | ||
environment: | ||
- "TRACING=1" | ||
- "CYPHERNODE_URL=https://gatekeeper:${GATEKEEPER_PORT}" | ||
image: cyphernode/batcher:v0.1.0 | ||
entrypoint: ["npm", "run", "start:dev"] | ||
volumes: | ||
- "$APP_SCRIPT_PATH/data:/batcher/data" | ||
- "$GATEKEEPER_DATAPATH/certs/cert.pem:/batcher/cert.pem:ro" | ||
- "$LOGS_DATAPATH:/batcher/logs" | ||
networks: | ||
- cyphernodeappsnet | ||
restart: always | ||
labels: | ||
- "traefik.docker.network=cyphernodeappsnet" | ||
- "traefik.frontend.rule=PathPrefixStrip:/batcher" | ||
- "traefik.frontend.passHostHeader=true" | ||
- "traefik.enable=true" | ||
- "traefik.port=8000" | ||
- "traefik.frontend.auth.basic.users=<username:bcrypt>" | ||
networks: | ||
cyphernodeappsnet: | ||
external: true |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
timeout_feature() { | ||
local interval=10 | ||
local totaltime=60 | ||
local testwhat=${1} | ||
local returncode | ||
local endtime=$(($(date +%s) + ${totaltime})) | ||
|
||
while : | ||
do | ||
eval ${testwhat} | ||
returncode=$? | ||
|
||
# If no error or 2 minutes passed, we get out of this loop | ||
([ "${returncode}" -eq "0" ] || [ $(date +%s) -gt ${endtime} ]) && break | ||
|
||
printf "\e[1;31mMaybe it's too early, I'll retry every ${interval} seconds for $((${totaltime} / 60)) minutes ($((${endtime} - $(date +%s))) seconds left).\e[1;0m\r\n" | ||
|
||
sleep ${interval} | ||
done | ||
|
||
return ${returncode} | ||
} | ||
|
||
do_test() { | ||
local rc | ||
rc=$(curl -k -s -o /dev/null -w "%{http_code}" https://127.0.0.1:${TRAEFIK_HTTPS_PORT}/batcher) | ||
[ "${rc}" -ne "401" ] && return 400 | ||
return 0 | ||
} | ||
|
||
export TRAEFIK_HTTPS_PORT | ||
|
||
timeout_feature do_test | ||
returncode=$? | ||
|
||
# return 0: tests cool | ||
# return 1: tests failed | ||
return $returncode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters