add web-bitdeals
This commit is contained in:
@@ -89,14 +89,8 @@ RUN su -l --shell /bin/bash $UNAME -c 'cd '$UHOME' ; \
|
||||
cd $UHOME/apostol-dm/cmake-build-release ;\
|
||||
make install
|
||||
|
||||
## Download "build" directory from web-build repository
|
||||
RUN su -l --shell /bin/bash $UNAME -c 'cd '$UHOME' ; \
|
||||
mkdir web-build ;\
|
||||
cd web-build ;\
|
||||
git init ;\
|
||||
git remote add -f origin https://git.bitdeals.org/private/web-build/ ;\
|
||||
echo build >> .git/info/sparse-checkout ;\
|
||||
git pull origin master'
|
||||
## to get web-bitdeals /app directory
|
||||
FROM registry.bitdeals.org/web-bitdeals as web-bitdeals
|
||||
|
||||
FROM updated-debian
|
||||
|
||||
@@ -108,11 +102,11 @@ ENV UHOME=$UHOME
|
||||
COPY --from=development /usr/local/ /usr/local/
|
||||
COPY --from=development /etc/dm/ /etc/dm/
|
||||
COPY --from=development /usr/sbin/dm /usr/sbin/dm
|
||||
COPY --from=development --chown=www-data:www-data $UHOME/web-build/build /var/www/web
|
||||
COPY --from=development --chown=$UNAME:$UNAME $UHOME/apostol-dm/docker/bitdeals-testnet.asc /etc/dm/bitdeals-testnet.asc
|
||||
COPY --from=development --chown=$UNAME:$UNAME $UHOME/apostol-dm/docker/bitdeals.asc /etc/dm/bitdeals.asc
|
||||
COPY --from=development $UHOME/apostol-dm/docker/run.sh /run.sh
|
||||
COPY --from=development $UHOME/apostol-dm/docker/dm /opt
|
||||
COPY --from=web-bitdeals --chown=www-data:www-data /app /var/www/app
|
||||
COPY ./docker/nginx.conf /etc/nginx/sites-enabled/default
|
||||
|
||||
## Generate bx testnet config
|
||||
|
||||
@@ -23,13 +23,12 @@ Here are some example snippets to help you get started creating a container at l
|
||||
version: "3"
|
||||
services:
|
||||
bitdeals-module:
|
||||
image: bitdeals/apostol-dm
|
||||
image: registry.bitdeals.org/apostol-dm
|
||||
environment:
|
||||
- DM_TESTNET=true
|
||||
- DM_BITCOIN=<address>
|
||||
- DM_FEE=<0.1%>
|
||||
- DM_FORWEB=http://127.0.0.1
|
||||
- DM_WEBAUTH=false
|
||||
- |
|
||||
DM_PGP_SEC=
|
||||
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||
@@ -54,13 +53,11 @@ docker run -d \
|
||||
-e DM_BITCOIN=<address> \
|
||||
-e DM_FEE=0.1% \
|
||||
-e DM_PGP_SEC="$(gpg2 --armor --export-secret-key Account_URL)" \
|
||||
-e DM_LC_ALL=ru_RU.UTF-8 \
|
||||
-e DM_WEB_LANG=ru \
|
||||
-p 127.0.0.1:4999:4999 \
|
||||
-p 127.0.0.1:80:80 \
|
||||
-p 127.0.0.1:443:443 \
|
||||
-v /home/dm/:/home/dm/ \
|
||||
bitdeals/apostol-dm
|
||||
registry.bitdeals.org/apostol-dm
|
||||
```
|
||||
|
||||
# Parameters
|
||||
@@ -82,6 +79,7 @@ Container images are configured using parameters passed at runtime.
|
||||
|-e DM_PGP_SEC=|Variable with ASCII armored PGP user secret key. Will be created if empty (with Account_URL in the key details).|
|
||||
|-e DM_TESTNET=|Enable bitcoin testnet mode. Default: `false`|
|
||||
|-e DM_TZ=|Set timezone for dm. Default: `Etc/UTC`|
|
||||
|-e DM_WEBAUTH=|Enable Web app authorization on bitdeals.org for account info access. Default: `false`|
|
||||
|-e DM_WEB_LANG=|Set interface language for dm WebUI. Default: `en`|
|
||||
|-e DM_PRIVATEDASH=|Enable Web app authorization on bitdeals.org for account private dashboard access. Default: `false`|
|
||||
|-e DM_PRIVACY_MODE=|Block currency rates from coinbase.com. Default: `false`|
|
||||
|-e DM_WEB_LANG=|Set interface language for dm WebUI: `ru` or `en`. Default: `en`|
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
var appConfig = {
|
||||
defaultLanguage: "$DM_WEB_LANG",
|
||||
|
||||
creditsText: "BitDeals © $YEAR.",
|
||||
creditsShortText: "BitDeals",
|
||||
|
||||
confAuthorize: $DM_WEBAUTH,
|
||||
confAuthorize: $DM_PRIVATEDASH,
|
||||
signIn: "/signin",
|
||||
signUp: "/signup",
|
||||
|
||||
@@ -31,7 +30,7 @@ var appConfig = {
|
||||
"https://matrix.bitdeals.org/#/room/#chan:matrix.bitdeals.org": "Users chat room",
|
||||
},
|
||||
|
||||
confPrivateDash: true,
|
||||
confPrivateDash: $DM_PRIVATEDASH,
|
||||
confDealModule: true,
|
||||
|
||||
confAdmin: true,
|
||||
@@ -43,6 +42,8 @@ var appConfig = {
|
||||
},
|
||||
|
||||
maxFileSize: 512000,
|
||||
|
||||
PRIVACY_MODE: $DM_PRIVACY_MODE,
|
||||
};
|
||||
|
||||
var appMessages = {};
|
||||
@@ -9,7 +9,7 @@ server {
|
||||
rewrite ^/private/$ /dm/ permanent;
|
||||
|
||||
location / {
|
||||
root /var/www/web;
|
||||
root /var/www/app;
|
||||
index index.html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,8 @@ init_config()
|
||||
NPROC="$(nproc)"
|
||||
export WORKERS="${WORKERS:-$NPROC}"
|
||||
export PGP_SEC_FILE="$UHOME/pgp-key.sec"
|
||||
export DM_WEBAUTH="${DM_WEBAUTH:-false}"
|
||||
export DM_PRIVATEDASH="${DM_PRIVATEDASH:-false}"
|
||||
export DM_PRIVACY_MODE="${DM_PRIVACY_MODE:-false}"
|
||||
|
||||
if [ "$DM_TESTNET" = false ]
|
||||
then
|
||||
@@ -79,7 +80,7 @@ init_config()
|
||||
envsubst < /opt/oauth2/default.json > /etc/dm/oauth2/default.json
|
||||
envsubst < /opt/oauth2/service.json > /etc/dm/oauth2/service.json
|
||||
envsubst < /opt/sites/default.json > /etc/dm/sites/default.json
|
||||
envsubst < /opt/web-config.js > /var/www/web/config.js
|
||||
envsubst < /opt/config.js > /var/www/app/config.js
|
||||
}
|
||||
|
||||
generate_pgp_key()
|
||||
|
||||
Reference in New Issue
Block a user