Skip to content

Commit

Permalink
feat: decode macaroon and tls via entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ngutech21 committed Dec 15, 2023
1 parent dcaa840 commit 2caebd5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ RUN cargo build --package moksha-mint --release
FROM debian:bullseye-slim
COPY --from=rust-builder /rust-app/target/release/moksha-mint /

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

WORKDIR /
CMD ["./moksha-mint"]
8 changes: 8 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

# Decode the base64 environment variables and write them to files
echo "$LND_MACAROON_BASE64" | base64 -d > /lndconf/admin.macaroon
echo "$LND_TLS_CERT_BASE64" | base64 -d > /lndconf/tls.cert

# Start your application
exec "$@"

0 comments on commit 2caebd5

Please sign in to comment.