From 7cef0d9133d709ea617eb377ac694786d6a1a17c Mon Sep 17 00:00:00 2001 From: status404 Date: Fri, 17 Mar 2023 12:24:55 -0100 Subject: [PATCH] Dockerfile fix --- docker-compose.yml | 9 ++++++--- docker/Dockerfile | 2 +- docker/README.md | 14 ++++++++------ docker/entrypoint.sh | 2 +- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e98ef9c..d88319d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,9 @@ services: bitdeals-module: image: bitdeals/apostol-dm environment: - - DM_TESTNET=0 + - DM_FORWEB=https://127.0.0.1 + - DM_WEBAUTH=0 + - DM_TESTNET=1 - DM_BITCOIN= - DM_FEE=0.1% - | @@ -15,8 +17,9 @@ services: volumes: - dm:/home/dm ports: - - 4999:4999 - - 80:80 + - 127.0.0.1:4999:4999 + - 127.0.0.1:80:80 + - 127.0.0.1:443:443 volumes: dm: diff --git a/docker/Dockerfile b/docker/Dockerfile index e0d54c5..ddfc004 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -109,7 +109,7 @@ COPY --from=development /etc/dm/ /etc/dm/ COPY --from=development /usr/sbin/dm /usr/sbin/dm COPY --from=development /etc/init.d/dm /etc/init.d/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-test.asc /etc/dm/bitdeals-testnet.asc +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/entrypoint.sh /entrypoint.sh COPY nginx.conf /etc/nginx/sites-enabled/default diff --git a/docker/README.md b/docker/README.md index ecef53d..980fcc8 100644 --- a/docker/README.md +++ b/docker/README.md @@ -13,7 +13,7 @@ Daemon settings which may specified by an environment variables are saved to the # Usage -Here are some example snippets to help you get started creating a container. +Here are some example snippets to help you get started creating a container at localhost. ## docker-compose @@ -26,8 +26,7 @@ services: - DM_TESTNET=0 - DM_BITCOIN=
- DM_FEE=<0.1%> - - DM_PGP_PASSWORD= - - DM_FORWEB=http://127.0.0.1:4999 + - DM_FORWEB=https://127.0.0.1 - DM_WEBAUTH=0 - | DM_PGP_SEC= @@ -39,7 +38,8 @@ services: - dm:/home/dm ports: - 127.0.0.1:4999:4999 - - 80:80 + - 127.0.0.1:80:80 + - 127.0.0.1:443:443 volumes: dm: ``` @@ -56,6 +56,7 @@ docker run -d \ -e DM_LC_ALL=en_US.UTF-8 \ -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 ``` @@ -66,14 +67,15 @@ Container images are configured using parameters passed at runtime. |Parameter|Function| |:--------|:-------| -|-p 80|WebUI port TCP| +|-p 80|WebUI port| +|-p 443|WebUI port| |-p 4999|dm API port [(API documentation)](/private/apostol-dm/src/branch/master/doc/REST-API-ru.md)| |-e DM_TESTNET=|Enable bitcoin testnet mode. Default: `0`| |-e DM_BITCOIN=|User account bitcoin address. Will be created if empty.| |-e DM_FEE=|User fee for created deals. You MUST indicate the sign "%" for a percentage of the deal amount or FIXED value in satoshi. Default: `0.1%`| |-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_PGP_PASSWORD=|User PGP key password.| -|-e DM_FORWEB=|dm host for dm Web app (the host should be accessable from your browser). Default: `http://127.0.0.1:4999`| +|-e DM_FORWEB=|dm host for dm Web app (the host should be accessable from your browser). Default: `https://127.0.0.1`| |-e DM_WEBAUTH=|Enable Web app user interface authentication. Default: `0`| |-e DM_LC_ALL=|Set locale for dm. Default: `en_US.UTF-8`| |-e DM_ACCOUNT_URL=|Set Account_URL for a new account registration. Format: `http[s]://[:]`| diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index cd85d99..1c49176 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -185,7 +185,7 @@ EOF else test -f $BITCOIN_KEYS_BACKUP \ && echo -e "NOTE: Your Bitcoin key saved to $(dirname $BITCOIN_KEYS_BACKUP)/${B}$(basename $BITCOIN_KEYS_BACKUP)${N}"\ - || echo -e "NOTE: Your ${B}Bitcoin${N} address: $_DM_BITCOIN" + || echo -e "NOTE: Your Bitcoin address: $_DM_BITCOIN" fi ## Generate self-signed certificate