Docker: change https to http
This commit is contained in:
@@ -3,10 +3,11 @@ services:
|
|||||||
apostol-dm:
|
apostol-dm:
|
||||||
image: bitdeals/apostol-dm
|
image: bitdeals/apostol-dm
|
||||||
environment:
|
environment:
|
||||||
- DM_FORWEB=https://127.0.0.1
|
- DM_FORWEB=http://127.0.0.1
|
||||||
- DM_TESTNET=1
|
- DM_TESTNET=true
|
||||||
- DM_BITCOIN=
|
- DM_BITCOIN=
|
||||||
- DM_FEE=0.1%
|
- DM_FEE=0.1%
|
||||||
|
- DM_WEBAUTH=false
|
||||||
- |
|
- |
|
||||||
DM_PGP_SEC=
|
DM_PGP_SEC=
|
||||||
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ services:
|
|||||||
- DM_TESTNET=true
|
- DM_TESTNET=true
|
||||||
- DM_BITCOIN=<address>
|
- DM_BITCOIN=<address>
|
||||||
- DM_FEE=<0.1%>
|
- DM_FEE=<0.1%>
|
||||||
- DM_FORWEB=127.0.0.1
|
- DM_FORWEB=http://127.0.0.1
|
||||||
|
- DM_WEBAUTH=false
|
||||||
- |
|
- |
|
||||||
DM_PGP_SEC=
|
DM_PGP_SEC=
|
||||||
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||||
@@ -75,12 +76,12 @@ Container images are configured using parameters passed at runtime.
|
|||||||
|-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_BITDEALS_PGP_FINGERPRINT=|Force to get BitDeals PGP key by fingerprint from keyserver. Default: `none`|
|
|-e DM_BITDEALS_PGP_FINGERPRINT=|Force to get BitDeals PGP key by fingerprint from keyserver. Default: `none`|
|
||||||
|-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_FORWEB=|dm host for dm Web app (the host should be accessable from your browser). Default: `https://127.0.0.1`|
|
|-e DM_FORWEB=|dm host for dm Web app (the host should be accessable from your browser). Default: `http://127.0.0.1`|
|
||||||
|-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_PGP_PASSWORD=|User PGP key password.|
|
|-e DM_PGP_PASSWORD=|User PGP key password.|
|
||||||
|-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_TESTNET=|Enable bitcoin testnet mode. Default: `0`|
|
|-e DM_TESTNET=|Enable bitcoin testnet mode. Default: `false`|
|
||||||
|-e DM_TZ=|Set timezone for dm. Default: `Etc/UTC`|
|
|-e DM_TZ=|Set timezone for dm. Default: `Etc/UTC`|
|
||||||
|-e DM_WEBAUTH=|Enable Web app user interface authentication. Default: `0`|
|
|-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_WEB_LANG=|Set interface language for dm WebUI. Default: `en`|
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ var appConfig = {
|
|||||||
creditsText: "BitDeals © $YEAR.",
|
creditsText: "BitDeals © $YEAR.",
|
||||||
creditsShortText: "BitDeals",
|
creditsShortText: "BitDeals",
|
||||||
|
|
||||||
confAuthorize: false,
|
confAuthorize: $DM_WEBAUTH,
|
||||||
signIn: "/signin",
|
signIn: "/signin",
|
||||||
signUp: "/signup",
|
signUp: "/signup",
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,10 @@
|
|||||||
server {
|
server {
|
||||||
|
|
||||||
listen 80 default_server;
|
listen 80 default_server;
|
||||||
listen [::]:80 default_server;
|
listen [::]:80 default_server;
|
||||||
|
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
location / {
|
|
||||||
return 301 https://$host$request_uri;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
|
|
||||||
index index.html;
|
|
||||||
|
|
||||||
server_name _;
|
|
||||||
|
|
||||||
rewrite ^/$ /dm/ permanent;
|
rewrite ^/$ /dm/ permanent;
|
||||||
rewrite ^/private/$ /dm/ permanent;
|
rewrite ^/private/$ /dm/ permanent;
|
||||||
|
|
||||||
@@ -34,11 +24,5 @@ server {
|
|||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
}
|
}
|
||||||
|
|
||||||
listen [::]:443 ssl ipv6only=on;
|
|
||||||
listen 443 ssl;
|
|
||||||
ssl_certificate /home/dm/ssl-fullchain.pem;
|
|
||||||
ssl_certificate_key /home/dm/ssl-privkey.pem;
|
|
||||||
ssl_dhparam /etc/ssl/dhparam.pem;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
DM_LC_ALL=${DM_LC_ALL:-"en_US.UTF-8"}
|
DM_LC_ALL=${DM_LC_ALL:-"en_US.UTF-8"}
|
||||||
DM_TZ=${DM_TZ:-"Etc/UTC"}
|
DM_TZ=${DM_TZ:-"Etc/UTC"}
|
||||||
|
|
||||||
export DM_FORWEB=${DM_FORWEB:-127.0.0.1}
|
export DM_FORWEB=${DM_FORWEB:-http://127.0.0.1}
|
||||||
export DM_TESTNET=${DM_TESTNET:-false}
|
export DM_TESTNET=${DM_TESTNET:-false}
|
||||||
export DM_WEB_LANG=${DM_WEB_LANG:-en}
|
export DM_WEB_LANG=${DM_WEB_LANG:-en}
|
||||||
export YEAR=$(date '+%Y')
|
export YEAR=$(date '+%Y')
|
||||||
@@ -38,6 +38,7 @@ init_config()
|
|||||||
NPROC="$(nproc)"
|
NPROC="$(nproc)"
|
||||||
export WORKERS="${WORKERS:-$NPROC}"
|
export WORKERS="${WORKERS:-$NPROC}"
|
||||||
export PGP_SEC_FILE="$UHOME/pgp-key.sec"
|
export PGP_SEC_FILE="$UHOME/pgp-key.sec"
|
||||||
|
export DM_WEBAUTH="${DM_WEBAUTH:-false}"
|
||||||
|
|
||||||
if [ "$DM_TESTNET" = false ]
|
if [ "$DM_TESTNET" = false ]
|
||||||
then
|
then
|
||||||
@@ -162,30 +163,11 @@ EOF
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_ssl_key()
|
|
||||||
{
|
|
||||||
WEB_CERT="$UHOME/ssl-fullchain.pem"
|
|
||||||
WEB_KEY="$UHOME/ssl-privkey.pem"
|
|
||||||
WEB_DH="/etc/ssl/dhparam.pem"
|
|
||||||
|
|
||||||
## Generate self-signed certificate
|
|
||||||
if ! [ -f $WEB_KEY -a -f $WEB_CERT ]; then
|
|
||||||
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -batch \
|
|
||||||
-keyout $WEB_KEY \
|
|
||||||
-out $WEB_CERT
|
|
||||||
fi
|
|
||||||
if ! [ -f $WEB_DH ]; then
|
|
||||||
echo "Generating DH parameters, 1024 bit long safe prime"
|
|
||||||
openssl dhparam -out $WEB_DH 1024 2>/dev/null
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
set_locale
|
set_locale
|
||||||
init_config
|
init_config
|
||||||
generate_pgp_key
|
generate_pgp_key
|
||||||
generate_btc_key
|
generate_btc_key
|
||||||
generate_ssl_key
|
|
||||||
|
|
||||||
|
|
||||||
## Run the daemon
|
## Run the daemon
|
||||||
|
|||||||
Reference in New Issue
Block a user