Rename shared network to btc-network, remove default network

- All services use btc-network exclusively
- Increase Frankfurter retry to 12x10s for cold start resilience

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 09:10:56 +01:00
co-authored by Claude Opus 4.6
parent dbf19566e8
commit 8125b4a743
2 changed files with 8 additions and 7 deletions
+5 -4
View File
@@ -1,6 +1,6 @@
networks: networks:
shared: btc-network:
name: shared name: btc-network
external: true external: true
services: services:
@@ -12,8 +12,7 @@ services:
depends_on: depends_on:
- frankfurter - frankfurter
networks: networks:
- default - btc-network
- shared
environment: environment:
BTCDATA_PORT: "${DOCKER_BTCDATA_PORT}" BTCDATA_PORT: "${DOCKER_BTCDATA_PORT}"
JDBC_URL: "${DOCKER_JDBC_URL}" JDBC_URL: "${DOCKER_JDBC_URL}"
@@ -26,3 +25,5 @@ services:
frankfurter: frankfurter:
image: lineofflight/frankfurter image: lineofflight/frankfurter
restart: unless-stopped restart: unless-stopped
networks:
- btc-network
@@ -36,15 +36,15 @@
"Fetch immediately, then poll every 60 minutes." "Fetch immediately, then poll every 60 minutes."
[client base-url rates-atom running?] [client base-url rates-atom running?]
(future (future
(loop [retries 5] (loop [retries 12]
(let [ok? (try (let [ok? (try
(poll! client base-url rates-atom) (poll! client base-url rates-atom)
true true
(catch Exception e (catch Exception e
(log/error e (str "Frankfurter fetch failed, retrying in 5s (" retries " left)")) (log/error e (str "Frankfurter fetch failed, retrying in 10s (" retries " left)"))
false))] false))]
(when (and (not ok?) @running? (pos? retries)) (when (and (not ok?) @running? (pos? retries))
(Thread/sleep 5000) (Thread/sleep 10000)
(recur (dec retries))))) (recur (dec retries)))))
(while @running? (while @running?
(Thread/sleep 3600000) (Thread/sleep 3600000)