4.5 KiB
4.5 KiB
gnutaler-docker
Container stack for GNU Taler (Exchange, Merchant, LibEuFin Bank) with optional Caddy reverse proxy, automatic DB initialization, and an optional WordPress/WooCommerce demo shop with the GNU Taler payment plugin.
Components
compose.yml: services postgres, exchange, merchant, bank, Caddy (*.domain.tld), one-offexchange-account-initjob, optionalmariadb/wordpress/wp-init.Dockerfile: builds GNUnet/Taler/LibEuFin from Git and ships helper scripts.entrypoints/with-dbinit.sh: renders templates viaenvsubst, waits for Postgres, runs*-dbinit, sets LibEuFin admin/user passwords.postgres/init/01-init-taler.sh: creates DB users/databases using passwords from.env.scripts/enable-exchange-account.sh: offline tool to enable the exchange payto account (optional, gated byENABLE_EXCHANGE_ACCOUNT).scripts/provision-bank-user.sh: creates a bank user, sets debit limit, generates a token, and writes it to the host.exchange/…,merchant/…,bank/…: templated configs plus terms/privacy.caddy/Caddyfile: reverse proxy with hosts from environment, ACME certificates.wordpressstack: MariaDB + WordPress + WP-CLI init installing WooCommerce andgnu-taler-payment-for-woocommerce.
Quick start
- Prereqs: Docker + Docker Compose.
- Copy
.env.example→.envand fill it (passwords, hosts/URLs, ACME mail, master key,EXCHANGE_SECRETS_PATH, etc.). Important:EXCHANGE_SECRETS_PATH: host path containing the exchange master private key (persistent!).MASTER_PUBLIC_KEY: must match the master private key.LIBEUFIN_MERCHANT_TOKEN: set after token generation (see below).- Versions:
GNUNET_REF(default v0.26.1),EXCHANGE_REF,MERCHANT_REF,LIBEUFIN_REF, optionalGNUNET_TARBALL_URLfor tarball builds.
- Build:
./scripts/build-image.sh(liest.envfür Build-Refs/URLs). Alternativ mit expliziten Build-Args, dadocker build ...die.envNICHT automatisch lädt:docker build \ --build-arg GNUNET_TARBALL_URL="$GNUNET_TARBALL_URL" \ --build-arg GNUNET_REF="$GNUNET_REF" \ --build-arg EXCHANGE_REF="$EXCHANGE_REF" \ --build-arg MERCHANT_REF="$MERCHANT_REF" \ --build-arg LIBEUFIN_REF="$LIBEUFIN_REF" \ -t taler-stack:build . - Start:
docker compose up -d - Generate bank token:
./scripts/provision-bank-user.sh(bank service must be running). The token is written toTOKEN_OUTPUT(defaultbank/token-info.txt); copy the secret token into.envasLIBEUFIN_MERCHANT_TOKEN. - Optional: auto-enable exchange payto by setting
ENABLE_EXCHANGE_ACCOUNT=1in.env(adjust PAYTO/hosts); job runs asexchange-account-init. - WordPress/WooCommerce (optional): set
WP_DB_*,WP_URL, admin creds, andWORDPRESS_HOSTin.env;wp-initinstalls WordPress, WooCommerce, and the GNU Taler payment plugin.
Caddy / reverse proxy
- Hosts via
BANK_HOST,EXCHANGE_HOST,MERCHANT_HOST,WORDPRESS_HOST; ACME mail viaCADDY_ACME_EMAIL. - On domain changes, adjust BASE_URL/PAYTO in
.env; templates render automatically at startup. - You can remove direct port mappings (8080/8081/9966/8085) if only Caddy should be exposed.
Notes
- Passwords in
.envmust matchpostgres/init/01-init-taler.sh(picked up automatically via environment). - Keep the master key stable; mount it via
EXCHANGE_SECRETS_PATH, do not regenerate on startup. - If
ENABLE_EXCHANGE_ACCOUNT=0, run the offline tool manually (scripts/enable-exchange-account.shinside the exchange container). - With custom CAs, set
EXCHANGE_CURL_OPTS="-k"if the offline job needs to curl/keysover HTTPS. - After changing DB passwords in
.env, no manual SQL rendering is needed—the init script reads them at container start. - Release refs/tarballs: Browse tags/commits at
https://git.taler.net/{gnunet,exchange,merchant,libeufin}.git/(Tarballs via.../snapshot/<tag>.tar.gz) and set*_REF/GNUNET_TARBALL_URLaccordingly. - Offline tarball drop-in: place tarballs under
vendor/(gnunet-*.tar.gz,exchange-*.tar.gz,merchant-*.tar.gz,libeufin-*.tar.gz); the build picks the first match and falls back to git if incomplete. - Fetch release tarballs:
./scripts/fetch-tarballs.sh(uses current stable versions; override with*_VERSIONor*_TARBALL_URLenv vars).
Useful commands
- Logs:
docker compose logs -f exchange(or bank/merchant/caddy/wordpress). - Re-provision bank users/token:
./scripts/provision-bank-user.sh - Manual payto enable:
docker compose run --rm exchange /usr/local/bin/enable-exchange-account.sh PAYTO_URI=...