Dockerfile fix

This commit is contained in:
2023-03-17 12:24:55 -01:00
parent e2dbd3cc6f
commit 7cef0d9133
4 changed files with 16 additions and 11 deletions

View File

@@ -3,7 +3,9 @@ services:
bitdeals-module: bitdeals-module:
image: bitdeals/apostol-dm image: bitdeals/apostol-dm
environment: environment:
- DM_TESTNET=0 - DM_FORWEB=https://127.0.0.1
- DM_WEBAUTH=0
- DM_TESTNET=1
- DM_BITCOIN= - DM_BITCOIN=
- DM_FEE=0.1% - DM_FEE=0.1%
- | - |
@@ -15,8 +17,9 @@ services:
volumes: volumes:
- dm:/home/dm - dm:/home/dm
ports: ports:
- 4999:4999 - 127.0.0.1:4999:4999
- 80:80 - 127.0.0.1:80:80
- 127.0.0.1:443:443
volumes: volumes:
dm: dm:

View File

@@ -109,7 +109,7 @@ COPY --from=development /etc/dm/ /etc/dm/
COPY --from=development /usr/sbin/dm /usr/sbin/dm COPY --from=development /usr/sbin/dm /usr/sbin/dm
COPY --from=development /etc/init.d/dm /etc/init.d/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=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 --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 --from=development $UHOME/apostol-dm/docker/entrypoint.sh /entrypoint.sh
COPY nginx.conf /etc/nginx/sites-enabled/default COPY nginx.conf /etc/nginx/sites-enabled/default

View File

@@ -13,7 +13,7 @@ Daemon settings which may specified by an environment variables are saved to the
# Usage # 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 ## docker-compose
@@ -26,8 +26,7 @@ services:
- DM_TESTNET=0 - DM_TESTNET=0
- DM_BITCOIN=<address> - DM_BITCOIN=<address>
- DM_FEE=<0.1%> - DM_FEE=<0.1%>
- DM_PGP_PASSWORD=<password> - DM_FORWEB=https://127.0.0.1
- DM_FORWEB=http://127.0.0.1:4999
- DM_WEBAUTH=0 - DM_WEBAUTH=0
- | - |
DM_PGP_SEC= DM_PGP_SEC=
@@ -39,7 +38,8 @@ services:
- dm:/home/dm - dm:/home/dm
ports: ports:
- 127.0.0.1:4999:4999 - 127.0.0.1:4999:4999
- 80:80 - 127.0.0.1:80:80
- 127.0.0.1:443:443
volumes: volumes:
dm: dm:
``` ```
@@ -56,6 +56,7 @@ docker run -d \
-e DM_LC_ALL=en_US.UTF-8 \ -e DM_LC_ALL=en_US.UTF-8 \
-p 127.0.0.1:4999:4999 \ -p 127.0.0.1:4999:4999 \
-p 127.0.0.1:80:80 \ -p 127.0.0.1:80:80 \
-p 127.0.0.1:443:443 \
-v /home/dm/:/home/dm/ \ -v /home/dm/:/home/dm/ \
bitdeals/apostol-dm bitdeals/apostol-dm
``` ```
@@ -66,14 +67,15 @@ Container images are configured using parameters passed at runtime.
|Parameter|Function| |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)| |-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_TESTNET=|Enable bitcoin testnet mode. Default: `0`|
|-e DM_BITCOIN=|User account bitcoin address. Will be created if empty.| |-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_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_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_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_WEBAUTH=|Enable Web app user interface authentication. Default: `0`|
|-e DM_LC_ALL=|Set locale for dm. Default: `en_US.UTF-8`| |-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]://<host>[:<port>]`| |-e DM_ACCOUNT_URL=|Set Account_URL for a new account registration. Format: `http[s]://<host>[:<port>]`|

View File

@@ -185,7 +185,7 @@ EOF
else else
test -f $BITCOIN_KEYS_BACKUP \ 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 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 fi
## Generate self-signed certificate ## Generate self-signed certificate