Browse Source

Merge branch 'feature/wordpress'

feature/auto_ssh
nicolas.dorier 6 years ago
parent
commit
9c0e8f58e7
  1. 4
      README.md
  2. 7
      btcpay-setup.sh
  3. 39
      docker-compose-generator/docker-fragments/opt-add-woocommerce.yml

4
README.md

@ -128,7 +128,8 @@ You can read [the article](https://medium.com/@BtcpayServer/hosting-btcpay-serve
Additionally, there are specific environment variables for some addons:
* `LIBREPATRON_HOST`: If libre patron is activated, The hostname of your libre patron website (eg. `librepatron.example.com`)
* `LIBREPATRON_HOST`: If libre patron is activated with [opt-add-librepatron](docker-compose-generator/docker-fragments/opt-add-librepatron.yml), the hostname of your libre patron website (eg. `librepatron.example.com`)
* `WOOCOMMERCE_HOST`: If woocommerce is activated with [opt-add-woocommerce](docker-compose-generator/docker-fragments/opt-add-woocommerce.yml), the hostname of your woocommerce website (eg. `store.example.com`)
# Tooling
@ -162,6 +163,7 @@ Available `BTCPAYGEN_ADDITIONAL_FRAGMENTS` currently are:
* [opt-save-memory](docker-compose-generator/docker-fragments/opt-save-memory.yml) will decrease the default dbcache at the expense of longer synchronization time (Useful if your machine is less than 2GB)
* [opt-add-btcqbo](docker-compose-generator/docker-fragments/opt-add-btcqbo.yml) will allow you to create an invoice on Quickbooks which include a way for your customer to pay on BTCPay Server (More information on this [github repository](https://github.com/JeffVandrewJr/btcqbo/), this add-on is maintained by [JeffVandrewJr](https://github.com/JeffVandrewJr), see more on [this video](https://www.youtube.com/watch?v=srgwL9ozg6c))
* [opt-add-librepatron](docker-compose-generator/docker-fragments/opt-add-librepatron.yml), for a self-hosted Patreon alternative backed by BTCPay (More information on this [github repository](https://github.com/JeffVandrewJr/patron), this add-on is maintained by [JeffVandrewJr](https://github.com/JeffVandrewJr).
* [opt-add-woocommerce](docker-compose-generator/docker-fragments/opt-add-woocommerce.yml), for a self-hosted woocommerce with BTCPay Server plugin pre installed.
You can also create your own [custom fragments](#how-can-i-customize-the-generated-docker-compose-file).

7
btcpay-setup.sh

@ -63,7 +63,8 @@ Environment variables:
BTCPAYGEN_DOCKER_IMAGE: Allows you to specify a custom docker image for the generator (Default: btcpayserver/docker-compose-generator)
BTCPAY_IMAGE: Allows you to specify the btcpayserver docker image to use over the default version. (Default: current stable version of btcpayserver)
Add-on specific variables:
LIBREPATRON_HOST: If libre patron is activated, The hostname of your libre patron website (eg. librepatron.example.com)
LIBREPATRON_HOST: If libre patron is activated with opt-add-librepatron, the hostname of your libre patron website (eg. librepatron.example.com)
WOOCOMMERCE_HOST: If woocommerce is activated with opt-add-woocommerce, the hostname of your woocommerce website (eg. store.example.com)
END
}
@ -140,6 +141,7 @@ echo "
Parameters passed:
BTCPAY_HOST:$BTCPAY_HOST
LIBREPATRON_HOST:$LIBREPATRON_HOST
WOOCOMMERCE_HOST:$WOOCOMMERCE_HOST
BTCPAY_HOST_SSHKEYFILE:$BTCPAY_HOST_SSHKEYFILE
LETSENCRYPT_EMAIL:$LETSENCRYPT_EMAIL
NBITCOIN_NETWORK:$NBITCOIN_NETWORK
@ -218,7 +220,8 @@ LETSENCRYPT_EMAIL=$LETSENCRYPT_EMAIL
LIGHTNING_ALIAS=$LIGHTNING_ALIAS
BTCPAY_SSHTRUSTEDFINGERPRINTS=$BTCPAY_SSHTRUSTEDFINGERPRINTS
BTCPAY_SSHKEYFILE=$BTCPAY_SSHKEYFILE
LIBREPATRON_HOST=$LIBREPATRON_HOST" > $BTCPAY_ENV_FILE
LIBREPATRON_HOST=$LIBREPATRON_HOST
WOOCOMMERCE_HOST=$WOOCOMMERCE_HOST" > $BTCPAY_ENV_FILE
echo -e "BTCPay Server docker-compose parameters saved in $BTCPAY_ENV_FILE\n"
. /etc/profile.d/btcpay-env.sh

39
docker-compose-generator/docker-fragments/opt-add-woocommerce.yml

@ -0,0 +1,39 @@
version: '3'
services:
woocommerce:
image: btcpayserver/docker-woocommerce:3.0.5
environment:
WOOCOMMERCE_HOST: ${WOOCOMMERCE_HOST}
WORDPRESS_DB_HOST: mariadb
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
LETSENCRYPT_HOST: ${WOOCOMMERCE_HOST}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
VIRTUAL_HOST: ${WOOCOMMERCE_HOST}
VIRTUAL_SERVICE_NAME: "woocommerce"
expose:
- "80"
links:
- mariadb
volumes:
- "woocommerce_html:/var/www/html"
mariadb:
image: mariadb:10.3
environment:
MYSQL_ROOT_PASSWORD: wordpressdb
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
expose:
- "3306"
volumes:
- "mariadb_datadir:/var/lib/mysql"
btcpayserver:
environment:
BTCPAY_EXTERNALSERVICES: "WooCommerce:${BTCPAY_PROTOCOL:-https}://${WOOCOMMERCE_HOST};"
volumes:
woocommerce_html:
mariadb_datadir:
Loading…
Cancel
Save