mirror of
https://github.com/aljazceru/btcpayserver-docker.git
synced 2025-12-23 23:04:22 +01:00
Isolate postgres and enable mysql & sqlite through docker
This commit is contained in:
@@ -9,7 +9,6 @@ services:
|
|||||||
- "49392"
|
- "49392"
|
||||||
environment:
|
environment:
|
||||||
# BTCPay settings
|
# BTCPay settings
|
||||||
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
|
|
||||||
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||||
BTCPAY_BIND: 0.0.0.0:49392
|
BTCPAY_BIND: 0.0.0.0:49392
|
||||||
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
|
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
|
||||||
@@ -19,7 +18,6 @@ services:
|
|||||||
BTCPAY_DEBUGLOG: btcpay.log
|
BTCPAY_DEBUGLOG: btcpay.log
|
||||||
links:
|
links:
|
||||||
- nbxplorer
|
- nbxplorer
|
||||||
- postgres
|
|
||||||
volumes:
|
volumes:
|
||||||
- "btcpay_datadir:/datadir"
|
- "btcpay_datadir:/datadir"
|
||||||
- "nbxplorer_datadir:/root/.nbxplorer"
|
- "nbxplorer_datadir:/root/.nbxplorer"
|
||||||
|
|||||||
19
docker-compose-generator/docker-fragments/mysql.yml
Normal file
19
docker-compose-generator/docker-fragments/mysql.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
restart: unless-stopped
|
||||||
|
image: mysql:8.0
|
||||||
|
volumes:
|
||||||
|
- "mysql_datadir:/var/lib/mysql"
|
||||||
|
environment:
|
||||||
|
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
||||||
|
|
||||||
|
btcpayserver:
|
||||||
|
environment:
|
||||||
|
BTCPAY_POSTGRES: Server=mysql;Database=btcpayserver${NBITCOIN_NETWORK:-regtest};Uid=root;Pwd=;Port=3306;
|
||||||
|
links:
|
||||||
|
- mysql
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
mysql_datadir:
|
||||||
@@ -6,6 +6,11 @@ services:
|
|||||||
image: postgres:9.6.5
|
image: postgres:9.6.5
|
||||||
volumes:
|
volumes:
|
||||||
- "postgres_datadir:/var/lib/postgresql/data"
|
- "postgres_datadir:/var/lib/postgresql/data"
|
||||||
|
btcpayserver:
|
||||||
|
environment:
|
||||||
|
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
|
||||||
|
links:
|
||||||
|
- postgres
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_datadir:
|
postgres_datadir:
|
||||||
@@ -17,6 +17,12 @@ namespace DockerGenerator
|
|||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string SelectedDatabase
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
public string SelectedLN
|
public string SelectedLN
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
@@ -39,6 +45,7 @@ namespace DockerGenerator
|
|||||||
continue;
|
continue;
|
||||||
composition.SelectedCryptos.Add(selectedCrypto.ToLowerInvariant());
|
composition.SelectedCryptos.Add(selectedCrypto.ToLowerInvariant());
|
||||||
}
|
}
|
||||||
|
composition.SelectedDatabase = (Environment.GetEnvironmentVariable("BTCPAYGEN_DATABASE") ?? "postgtres").ToLowerInvariant();
|
||||||
composition.SelectedProxy = (Environment.GetEnvironmentVariable("BTCPAYGEN_REVERSEPROXY") ?? "").ToLowerInvariant();
|
composition.SelectedProxy = (Environment.GetEnvironmentVariable("BTCPAYGEN_REVERSEPROXY") ?? "").ToLowerInvariant();
|
||||||
composition.SelectedLN = (Environment.GetEnvironmentVariable("BTCPAYGEN_LIGHTNING") ?? "").ToLowerInvariant();
|
composition.SelectedLN = (Environment.GetEnvironmentVariable("BTCPAYGEN_LIGHTNING") ?? "").ToLowerInvariant();
|
||||||
composition.AdditionalFragments = (Environment.GetEnvironmentVariable("BTCPAYGEN_ADDITIONAL_FRAGMENTS") ?? "").ToLowerInvariant()
|
composition.AdditionalFragments = (Environment.GetEnvironmentVariable("BTCPAYGEN_ADDITIONAL_FRAGMENTS") ?? "").ToLowerInvariant()
|
||||||
|
|||||||
@@ -51,7 +51,9 @@ namespace DockerGenerator
|
|||||||
}
|
}
|
||||||
fragments.Add("btcpayserver");
|
fragments.Add("btcpayserver");
|
||||||
fragments.Add("nbxplorer");
|
fragments.Add("nbxplorer");
|
||||||
fragments.Add("postgres");
|
if(composition.SelectedDatabase != "sqlite"){
|
||||||
|
fragments.Add(composition.SelectedDatabase);
|
||||||
|
}
|
||||||
foreach (var crypto in CryptoDefinition.GetDefinitions())
|
foreach (var crypto in CryptoDefinition.GetDefinitions())
|
||||||
{
|
{
|
||||||
if (!composition.SelectedCryptos.Contains(crypto.Crypto))
|
if (!composition.SelectedCryptos.Contains(crypto.Crypto))
|
||||||
|
|||||||
Reference in New Issue
Block a user