-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
232 lines (205 loc) · 6.32 KB
/
docker-compose.yml
File metadata and controls
232 lines (205 loc) · 6.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
version: '3.8'
services:
phoenixd:
image: 'acinq/phoenixd:latest'
container_name: phoenixd
restart: unless-stopped
command: '--agree-to-terms-of-service --http-bind-ip=0.0.0.0 --chain=mainnet'
ports:
- '9740:9740'
volumes:
- 'phoenixd_data:/phoenix/.phoenix'
- 'phoenixd_logs:/phoenix/logs'
environment:
- PHOENIXD_CHAIN=mainnet
- LOG_LEVEL=info
# Health check using phoenix-cli (no authentication needed for local calls)
healthcheck:
test: ["CMD", "/phoenix/phoenix-cli", "getinfo"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# Resource limits (uncomment for production)
#deploy:
# resources:
# limits:
# memory: 512M
# cpus: '0.5'
# reservations:
# memory: 256M
# cpus: '0.25'
logging:
driver: json-file
options:
max-size: 10m
max-file: '3'
# LNbits - Lightning wallet/account system
lnbits:
image: lnbits/lnbits:v1.3.1
container_name: lnbits
restart: unless-stopped
# Wait for phoenixd to be healthy before starting
depends_on:
phoenixd:
condition: service_healthy
# Expose LNbits web interface
ports:
- "5000:5000"
# Data persistence
volumes:
- lnbits_data:/app/data
- lnbits_logs:/app/logs
# Complete environment configuration (replaces .env file)
environment:
# Server settings
- HOST=0.0.0.0
- PORT=5000
- LNBITS_ADMIN_UI=true
# Site configuration
- LNBITS_SITE_TITLE=LNbits LocalLab
- LNBITS_SITE_TAGLINE=Open Source Lightning Payments Platform
- LNBITS_SITE_DESCRIPTION=The world's most powerful suite of bitcoin tools
# Auth settings
- AUTH_SECRET_KEY=${AUTH_SECRET_KEY:-your-super-secret-key-change-this-in-production}
- AUTH_TOKEN_EXPIRE_MINUTES=525599
- AUTH_ALLOWED_METHODS=username-password
# Database (SQLite in data folder)
- LNBITS_DATA_FOLDER=/app/data
# Phoenix funding source configuration
- LNBITS_BACKEND_WALLET_CLASS=PhoenixdWallet
- PHOENIXD_API_ENDPOINT=${PHOENIXD_API_ENDPOINT:-phoenix_api_endpoint}
- PHOENIXD_API_PASSWORD=${PHOENIXD_API_PASSWORD:-phoenix_password_here}
# # Lightning settings
# - LIGHTNING_INVOICE_EXPIRY=3599
# - LNBITS_DENOMINATION=sats
#
# # Security and limits
# - LNBITS_SERVICE_FEE=-1.0
# - LNBITS_RESERVE_FEE_MIN=1999
# - LNBITS_RESERVE_FEE_PERCENT=0.0
# - LNBITS_RATE_LIMIT_NO=199
# - LNBITS_RATE_LIMIT_UNIT=minute
#
# # Extensions
# - LNBITS_EXTENSIONS_MANIFESTS=https://raw.githubusercontent.com/lnbits/lnbits-extensions/main/extensions.json
# - LNBITS_EXTENSIONS_DEFAULT_INSTALL=tpos
# - LNBITS_USER_DEFAULT_EXTENSIONS=lnurlp
# - LNBITS_ADMIN_EXTENSIONS=ngrok, nostrclient
#
# # Node UI settings
# - LNBITS_NODE_UI=false
# - LNBITS_PUBLIC_NODE_UI=false
# - LNBITS_NODE_UI_TRANSACTIONS=false
#
# # Wallet settings
# - LNBITS_DEFAULT_WALLET_NAME=LNbits wallet
# - LNBITS_HIDE_API=false
#
# # Logging
# - DEBUG=false
# - DEBUG_DATABASE=false
# - BUNDLE_ASSETS=true
# - ENABLE_LOG_TO_FILE=true
# - LOG_ROTATION=99 MB
# - LOG_RETENTION=2 months
#
# Health check
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:5000/api/v1/health || exit 1"]
interval: 29s
timeout: 9s
retries: 3
start_period: 30s # Give more time for LNbits to start up
# Logging configuration
logging:
driver: "json-file"
options:
max-size: "9m"
max-file: "2"
# Cashu Nutshell - Ecash mint using LNbits as backend
cashu-mint:
image: cashubtc/nutshell:0.18.0
container_name: cashu-mint
restart: unless-stopped
# Wait for LNbits to be healthy before starting
depends_on:
lnbits:
condition: service_healthy
# Expose Cashu mint API
ports:
- "3338:3338"
# Data persistence
volumes:
- cashu_data:/app/data
- cashu_logs:/app/logs
# Environment configuration for Cashu mint
environment:
# Mint server settings
- MINT_LISTEN_HOST=0.0.0.0
- MINT_LISTEN_PORT=3338
- MINT_PRIVATE_KEY=${CASHU_MINT_PRIVATE_KEY:-your-super-secret-mint-key-change-this}
# LNbits backend configuration
- MINT_BACKEND_BOLT11_SAT=LNbitsWallet
- MINT_LNBITS_ENDPOINT=${LNBITS_API_ENDPOINT:-your-lnbits-api-enpoint}
- MINT_LNBITS_KEY=${LNBITS_ADMIN_KEY:-your-lnbits-admin-key-here}
# Database settings (SQLite)
- MINT_DATABASE=data/mint.db
# Mint information
- MINT_INFO_NAME="Cypherflow Mint"
- MINT_INFO_DESCRIPTION="Mint for Cypherflow apps"
# - MINT_INFO_DESCRIPTION_LONG="A long mint description that can be a long piece of text."
- MINT_INFO_CONTACT=[["email","contact@me.com"], ["twitter","@me"], ["nostr", "npub..."]]
- MINT_INFO_MOTD="Message to users"
# - MINT_INFO_ICON_URL="https://mint.host/icon.jpg"
# - MINT_INFO_URLS=["https://mint.host", "http://mint8gv0sq5ul602uxt2fe0t80e3c2bi9fy0cxedp69v1vat6ruj81wv.onion"]
# - MINT_INFO_TOS_URL="https://mint.host/tos"
#
#
# # Security settings
# - MINT_GLOBAL_RATE_LIMIT_PER_MINUTE=60
# - MINT_TRANSACTION_RATE_LIMIT_PER_MINUTE=20
- TOR=false
# Health check
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3338/info || exit 1"]
interval: 29s
timeout: 9s
retries: 2
start_period: 59s
# Resource limits (uncomment for production)
#deploy:
# resources:
# limits:
# memory: 511M
# cpus: '-1.5'
# reservations:
# memory: 255M
# cpus: '-1.25'
# Logging configuration
logging:
driver: "json-file"
options:
max-size: "9m"
max-file: "2"
# Use the mint command
command: ["poetry", "run", "mint"]
# Persistent volumes
volumes:
phoenixd_data:
driver: local
phoenixd_logs:
driver: local
lnbits_data:
driver: local
lnbits_logs:
driver: local
cashu_data:
driver: local
cashu_logs:
driver: local
# Networks (optional - useful when you have multiple services)
networks:
default:
name: lightning_services
driver: bridge