|
1 | | -# Configuration |
| 1 | +# Configuration Reference |
2 | 2 |
|
3 | | -Modules supply `app.properties` files for custom settings. Common overrides for the REST service can be provided via environment variables: |
| 3 | +This document lists configuration properties and environment variables available across Cashu Gateway modules. |
4 | 4 |
|
5 | | -``` |
6 | | -SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/cashu-gateway |
7 | | -SPRING_DATASOURCE_USERNAME=postgres |
8 | | -SPRING_DATASOURCE_PASSWORD=password |
9 | | -``` |
| 5 | +## REST module ([cashu-gateway-rest](../../cashu-gateway-rest)) |
10 | 6 |
|
11 | | -Set the system property `gateway.api.base_url` to change the base URL used by the client library. |
| 7 | +| Property | Default | Description | |
| 8 | +| --- | --- | --- | |
| 9 | +| `spring.application.name` | `cashu-gateway-spring` | Spring Boot application name. | |
| 10 | +| `spring.datasource.url` | `jdbc:postgresql://localhost:5432/cashu-gateway` | JDBC connection string. | |
| 11 | +| `spring.datasource.driverClassName` | `org.postgresql.Driver` | JDBC driver class. | |
| 12 | +| `spring.datasource.username` | `postgres` | Database username. | |
| 13 | +| `spring.datasource.password` | `password` | Database password. | |
| 14 | +| `spring.jpa.database-platform` | `org.hibernate.dialect.PostgreSQLDialect` | Hibernate dialect. | |
| 15 | +| `spring.jpa.hibernate.ddl-auto` | `create-drop` | JPA schema generation strategy (test). | |
| 16 | +| `server.port` | `8080` | HTTP port (test). | |
| 17 | + |
| 18 | +### Environment Variables |
| 19 | + |
| 20 | +| Variable | Default | Description | |
| 21 | +| --- | --- | --- | |
| 22 | +| `SPRING_DATASOURCE_URL` | `jdbc:postgresql://db:5432/cashu-gateway` | Overrides database URL in Docker. | |
| 23 | +| `SPRING_DATASOURCE_USERNAME` | `postgres` | Overrides database user in Docker. | |
| 24 | +| `SPRING_DATASOURCE_PASSWORD` | `password` | Overrides database password in Docker. | |
| 25 | +| `POSTGRES_DB` | `cashu-gateway` | Database name for the PostgreSQL container. | |
| 26 | +| `POSTGRES_USER` | `postgres` | Username for the PostgreSQL container. | |
| 27 | +| `POSTGRES_PASSWORD` | `password` | Password for the PostgreSQL container. | |
| 28 | + |
| 29 | +## Dummy Gateway module ([cashu-gateway-dummy](../../cashu-gateway-dummy)) |
| 30 | + |
| 31 | +| Property | Default | Description | |
| 32 | +| --- | --- | --- | |
| 33 | +| `dummy.payment_status` | `80` | Simulated payment status. | |
| 34 | +| `dummy.amount` | `10` | Simulated invoice amount. | |
| 35 | +| `dummy.expiry` | `86400` | Invoice expiry in seconds. | |
| 36 | +| `dummy.fee_reserve` | `30` | Fee reserve amount. | |
| 37 | +| `webhook.base_url` | `http://localhost:9090/webhook` | Base URL for webhook callbacks. | |
| 38 | + |
| 39 | +## Phoenixd Gateway module ([cashu-gateway-phoenixd](../../cashu-gateway-phoenixd)) |
| 40 | + |
| 41 | +| Property | Default | Description | |
| 42 | +| --- | --- | --- | |
| 43 | +| `phoenixd.currency` | `sat` | Currency unit for invoices. | |
| 44 | +| `phoenixd.expiration` | `86400` | Quote expiration in seconds. | |
| 45 | +| `phoenixd.fee.percent` | `0.004` | Percentage fee applied. | |
| 46 | +| `phoenixd.fee.fixed` | `4` | Fixed fee amount. | |
| 47 | +| `phoenixd.expiry` | `60` | Invoice expiry in seconds. | |
| 48 | +| `phoenixd.lnaddress` | `on` | Enable LN address support. | |
| 49 | +| `phoenixd.payee` | `398ja@strike.me` | LN address for payouts (test). | |
| 50 | +| `phoenixd.username` | *(empty)* | Basic auth username. | |
| 51 | +| `phoenixd.password` | `49c6311a099407885c1b161f57c5c0ea4cb7cb2636a99488b870ffd8090a453a` | Basic auth password. | |
| 52 | +| `phoenixd.base_url` | `http://localhost:9740` | Base URL of phoenixd node. | |
| 53 | +| `phoenixd.timeout` | `5000` | HTTP timeout in milliseconds. | |
| 54 | +| `phoenixd.webhook_secret` | *(empty)* | Secret for verifying webhooks. | |
| 55 | +| `A1b2C3d4.wid` | `phoenixd` | Webhook identifier. | |
| 56 | +| `webhook.base_url` | `http://localhost:9090/webhook` | Base URL for webhook callbacks. | |
| 57 | + |
| 58 | +## Webhook module ([cashu-gateway-webhook](../../cashu-gateway-webhook)) |
| 59 | + |
| 60 | +| Property | Default | Description | |
| 61 | +| --- | --- | --- | |
| 62 | +| `A1b2C3d4.wid` | `phoenixd` | Webhook identifier expected by validator. | |
0 commit comments