Docker fix: add ensubst

This commit is contained in:
2024-02-20 13:09:09 +03:00
parent 68ce2f1358
commit 7eaeb727c3
11 changed files with 443 additions and 286 deletions

View File

@@ -0,0 +1,30 @@
[main]
## Bitcoin testnet
## default: false
testnet=$DM_TESTNET
[endpoint]
## default: tcp://mainnet.libbitcoin.net:9091
#url=tcp://testnet.libbitcoin.net:19091
[transaction]
## Transaction minimum output value
## default: 200
#min_output=200
[miner]
## Transaction fee as a percentage of the deal amount
## ATTENTION: If the value is specified as a percentage, you MUST indicate the sign “%”,
## otherwise it will be a FIXED value in satoshi.
## Transaction fee for miner
## default: 1%
#fee=1%
## Transaction fee for miner (minimal)
## default: 200
#min=200
## Transaction fee for miner (maximum)
## default: 2000
#max=2000

105
docker/dm/dm.conf Normal file
View File

@@ -0,0 +1,105 @@
## Bitcoin Payment Service (Deal Module) config file
[main]
user=$UNAME
group=$UNAME
limitnofile=8192
## Count worker process
## default: 1
workers=$WORKERS
## Create helper process
## default: false
#helper=false
## Create master process
## Master process run processes:
## - worker (if count not equal 0)
## - helper (if value equal true)
## - process/* (if enabled)
## default: true
master=true
## Module: Web Service
[module/WebService]
## default: true
enable=true
## Module: Web Socket
[module/WebSocket]
## default: false
enable=true
[daemon]
## Run as daemon
## default: true
daemon=false
## Pid file
## default: logs/dm.pid
pid=/run/dm.pid
[log]
## Log files
## Available keys: alert, crit, error, warn, notice, info, debug
## default: error=logs/error.log
#alert=logs/error.log
crit=/var/log/dm/crit.log
error=/var/log/dm/error.log
#warn=/var/log/dm/error.log
#notice=/var/log/dm/message.log
#info=/var/log/dm/message.log
#debug=/var/log/dm/debug.log
[stream]
log=/var/log/dm/stream.log
## HTTP (Server) config section
[server]
## Listen address
## default: 0.0.0.0
listen=0.0.0.0
## Listen port number
## default: 4977
port=4999
## Connection timeout
## default: 5000
#timeout=5000
## Default web server file path
root=www
## Access log file
log=/var/log/dm/access.log
[module]
## Module Bitcoin address
## default: empty
address=$DM_BITCOIN
## OAuth2 configuration file
## default: service.json
oauth2=oauth2/service.json
## Module transaction fee as a percentage of the deal amount
## ATTENTION: If the value is specified as a percentage, you MUST indicate the sign “%”,
## otherwise it will be a FIXED value in satoshi.
## default: 0.1%
fee=$DM_FEE
[pgp]
## Path to PGP private file key
## default: empty
private=$PGP_SEC_FILE
## Path to PGP public file key
## default: empty
public=$BITDEALS_PGP_FILE
## PGP passphrase
## default: empty
passphrase=$DM_PGP_PASSWORD

View File

@@ -0,0 +1,17 @@
{
"web": {
"issuers": ["accounts.bitdeals.org"],
"scopes": ["api","openid","profile","email"],
"client_id": "web-bitdeals.org",
"client_secret": "4aJEJi3dsSypeUSRCah4gIIs",
"algorithm": "HS256",
"auth_uri": "/oauth2/authorize",
"token_uri": "/oauth2/token",
"redirect_uris": [
"http://127.0.0.1/oauth2/code",
"http://127.0.0.1/oauth2/callback",
"https://127.0.0.1/oauth2/code",
"https://127.0.0.1/oauth2/callback"
]
}
}

View File

@@ -0,0 +1,10 @@
{
"type": "service_account",
"issuers": ["accounts.bitdeals.org"],
"scopes": ["bitdeals"],
"client_id": "dm-bitdeals.org",
"client_secret": "TypQHP4TK44khO3cvOyuHYg3",
"algorithm": "HS256",
"auth_uri": "/oauth2/authorize",
"token_uri": "/oauth2/token"
}

View File

@@ -0,0 +1,11 @@
{
"hosts": ["127.0.0.1"],
"root": "/var/www/web",
"oauth2": {
"identifier": "/oauth/identifier",
"secret": "/oauth/secret",
"callback": "/",
"error": "/oauth/error",
"debug": "http://localhost:3000/"
}
}

48
docker/dm/web-config.js Normal file
View File

@@ -0,0 +1,48 @@
var appConfig = {
defaultLanguage: "$DM_WEB_LANG",
creditsText: "BitDeals © $YEAR.",
creditsShortText: "BitDeals",
confAuthorize: false,
signIn: "/signin",
signUp: "/signup",
apiTokenUrl: "https://$BITDEALS_SERVER/oauth2/token",
apiDomain: "https://$BITDEALS_SERVER",
wsDomain: "wss://$BITDEALS_SERVER",
apiPath: "/api/v1",
apiClientId: "web-bitdeals.org",
dmHost: "$DM_FORWEB",
dmPath: "/api/v1",
publicContentPath: "/content/md",
publicContentMenu: {
"menu.about": "/info/about",
"menu.manual": "/info/manual",
"menu.faq": "/info/faq",
"menu.terms": "/info/terms",
},
docLinks: {
"https://git.bitdeals.org/private/apostol-dm/src/branch/master/doc/REST-API-ru.md": "API Documentation",
"https://git.bitdeals.org/private/apostol-dm/issues": "DM Issues",
"https://matrix.bitdeals.org/#/room/#chan:matrix.bitdeals.org": "Users chat room",
},
confPrivateDash: true,
confDealModule: true,
confAdmin: true,
adminReferences: {
agent: {},
version: {},
server: {},
system: {},
},
maxFileSize: 512000,
};
var appMessages = {};