From 7a2738cdc52f63b5e5e5dd170f023654b4b02593 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 9 Apr 2018 11:57:56 +0900 Subject: [PATCH] Update README.md --- Production-NoReverseProxy/README.md | 32 ++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/Production-NoReverseProxy/README.md b/Production-NoReverseProxy/README.md index 36b67ba..52adbcb 100644 --- a/Production-NoReverseProxy/README.md +++ b/Production-NoReverseProxy/README.md @@ -22,4 +22,34 @@ The ports mapped on the host are: Note that you need to set `BTCPAY_PROTOCOL=http` if you want to do some tests locally without https. -If you forget, you will get an error HTTP 400 when trying to register a new account on the website. \ No newline at end of file +If you forget, you will get an error HTTP 400 when trying to register a new account on the website. + +## Example: + +With Powershell: + +``` +$env:BTCPAY_ROOTPATH="/test"; +$env:BTCPAY_PROTOCOL="http"; +$env:BTCPAY_HOST="btcpay.example.com"; +docker-compose -f docker-compose.btc.yml up +``` + +With Linux: + +``` +export BTCPAY_ROOTPATH="/test" +export BTCPAY_PROTOCOL="http" +export BTCPAY_HOST="btcpay.example.com" +docker-compose -f docker-compose.btc.yml up +``` + +Then edit your [host file](https://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/) with + +``` +127.0.0.1 sampleapi.example.com +``` + +Then browse `http://btcpay.example.com/test`. + +Note: Chrome seems to block cookie to http://127.0.0.1:80/, which is why it is advised to use a custom domain like this. \ No newline at end of file