File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ RUN echo "cloning ${BRANCH}" && \
24
24
25
25
# Get yq for chia config changes
26
26
FROM mikefarah/yq:4 AS yq
27
+ # Get chia-tools for a new experimental chia config management strategy
28
+ FROM ghcr.io/chia-network/chia-tools:latest AS chia-tools
27
29
28
30
# IMAGE BUILD
29
31
FROM python:3.11-slim
@@ -61,6 +63,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
61
63
dpkg-reconfigure -f noninteractive tzdata
62
64
63
65
COPY --from=yq /usr/bin/yq /usr/bin/yq
66
+ COPY --from=chia-tools /chia-tools /chia-tools
64
67
COPY --from=chia_build /chia-blockchain /chia-blockchain
65
68
66
69
ENV PATH=/chia-blockchain/venv/bin:$PATH
Original file line number Diff line number Diff line change @@ -297,4 +297,12 @@ if [[ ${service} == "harvester" ]]; then
297
297
fi
298
298
fi
299
299
300
+ # EXPERIMENTAL!
301
+ # If you use any of the chia tools config processing, your config will lose all yaml anchors and be fully expanded out
302
+ # Check if any of the env vars start with "chia." or "chia__" and if so, process the config with chia-tools
303
+ if env | grep -qE ' ^chia(\.|__)' ; then
304
+ echo " Found environment variables starting with 'chia.' or 'chia__' - Running chia-tools"
305
+ /chia-tools config edit " $CHIA_ROOT /config/config.yaml"
306
+ fi
307
+
300
308
exec " $@ "
You can’t perform that action at this time.
0 commit comments