Add the transpiled artifacts to build/ for a slimmer native Node Dock…#306
Merged
Overtorment merged 1 commit intoBlueWallet:masterfrom Nov 22, 2021
Merged
Conversation
kwizzn
commented
Sep 29, 2021
| let logger = require('../utils/logger'); | ||
| const MIN_BTC_BLOCK = 670000; | ||
| console.log('using config', JSON.stringify(config)); | ||
| if (process.env.NODE_ENV !== 'prod') { |
Contributor
Author
There was a problem hiding this comment.
No password logs in production.
kwizzn
commented
Sep 29, 2021
|
|
||
| # Create logs folder and ensure permissions are set correctly | ||
| RUN mkdir /lndhub/logs && chown -R lndhub:lndhub /lndhub | ||
| RUN mkdir -p /lndhub/logs && chown -R lndhub:lndhub /lndhub |
Contributor
Author
There was a problem hiding this comment.
This broke the Docker build if the directory already existed.
kwizzn
commented
Sep 29, 2021
| RUN rm -rf .git | ||
|
|
||
| FROM node:16-bullseye-slim | ||
| FROM node:16-alpine |
Contributor
Author
There was a problem hiding this comment.
Reduces the Docker image by ~100MB.
Member
|
@AaronDewes can you pls take a look..? |
Contributor
Sorry for the delay, while I agree the base image should be changed, #314 is better than this PR because it drops babel entirely. @kwizzn Can I merge this into #314? |
Contributor
Author
|
Sure @AaronDewes, go ahead. |
Member
|
so, what's the verdict? |
Contributor
|
This can probably get merged, I'll improve the other pr later |
Member
|
thanks! |
Member
|
hmm, after merging this i get build fail: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the transpiled artifacts to a new
build/directory for a slimmer (node:16-alpine) Docker image that does not require babel-node. This is a first iteration that makes LndHub run in our environment, I'm contributing this upstream in case it helps anyone. If it is appreciated, I have some future improvements in the pipeline. :)