Skip to content

Commit 4ee77b8

Browse files
AaronFeickertZk2u
authored andcommitted
Rename Docker test mode environment variable
1 parent 0fc9ba8 commit 4ee77b8

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

docker/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ COPY crates crates
3636
RUN cargo build --release --bin mosaic \
3737
&& cp target/release/mosaic target/release/mosaic-default \
3838
&& cargo build --release --features=reduced-circuits --bin mosaic \
39-
&& mv target/release/mosaic target/release/mosaic-reduced \
40-
&& strip --strip-debug target/release/mosaic-default target/release/mosaic-reduced
39+
&& mv target/release/mosaic target/release/mosaic-unsafe-test \
40+
&& strip --strip-debug target/release/mosaic-default target/release/mosaic-unsafe-test
4141

4242
# ------------------------------------------------------------------------------
4343
# Stage 2: Minimal runtime image
@@ -66,7 +66,7 @@ RUN FDB_ARCH=$([ "$TARGETARCH" = "arm64" ] && echo "aarch64" || echo "amd64") \
6666
RUN mkdir -p /etc/mosaic && chown ubuntu:ubuntu /etc/mosaic
6767

6868
COPY --from=builder /build/target/release/mosaic-default /usr/local/bin/mosaic
69-
COPY --from=builder /build/target/release/mosaic-reduced /usr/local/bin/mosaic-reduced
69+
COPY --from=builder /build/target/release/mosaic-unsafe-test /usr/local/bin/mosaic-unsafe-test
7070
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
7171
RUN chmod +x /usr/local/bin/entrypoint.sh
7272

docker/entrypoint.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
# The config file's [circuit] section should reference:
99
# path = "/etc/mosaic/circuit.v5c"
1010
#
11-
# Set MOSAIC_REDUCED_CIRCUITS=1 to run the reduced-circuits build.
11+
# Set MOSAIC_UNSAFE_TEST=1 to run in test mode, which is faster.
12+
# **WARNING**: Test mode is UNSAFE, and MUST NOT be used in production.
1213
#
1314
# Any extra arguments are forwarded to the mosaic binary.
1415

@@ -24,9 +25,9 @@ fi
2425

2526
MOSAIC_BIN="/usr/local/bin/mosaic"
2627

27-
case "${MOSAIC_REDUCED_CIRCUITS:-}" in
28+
case "${MOSAIC_UNSAFE_TEST:-}" in
2829
1|true|TRUE|yes|YES|on|ON)
29-
MOSAIC_BIN="/usr/local/bin/mosaic-reduced"
30+
MOSAIC_BIN="/usr/local/bin/mosaic-unsafe-test"
3031
;;
3132
esac
3233

0 commit comments

Comments
 (0)