Umbrel support (#141)
* Don't require BTC core connection * Docker: Don't clone, but use local repo * Add GitHub workflows * Allow to overwrite hostname * chore: update dependencies * Get tor URL from env
This commit is contained in:
23
Dockerfile
23
Dockerfile
@@ -6,19 +6,26 @@ RUN adduser --disabled-password \
|
||||
--gecos "" \
|
||||
"lndhub"
|
||||
|
||||
FROM node:buster-slim AS builder
|
||||
FROM node:12-buster-slim AS builder
|
||||
|
||||
# These packages are required for building LNDHub
|
||||
RUN apt-get update && apt-get -y install git python3
|
||||
|
||||
# TODO: Switch to official images once my PR is merged
|
||||
RUN git clone https://github.com/AaronDewes/LndHub.git -b update-dependencies /lndhub
|
||||
RUN apt-get update && apt-get -y install python3
|
||||
|
||||
WORKDIR /lndhub
|
||||
|
||||
# Copy 'package-lock.json' and 'package.json'
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm i
|
||||
|
||||
FROM node:buster-slim
|
||||
# Copy project files and folders to the current working directory
|
||||
COPY . .
|
||||
|
||||
# Delete git data as it's not needed inside the container
|
||||
RUN rm -rf .git
|
||||
|
||||
FROM node:12-buster-slim
|
||||
|
||||
# Create a specific user so LNDHub doesn't run as root
|
||||
COPY --from=perms /etc/group /etc/passwd /etc/shadow /etc/
|
||||
@@ -26,12 +33,8 @@ COPY --from=perms /etc/group /etc/passwd /etc/shadow /etc/
|
||||
# Copy LNDHub with installed modules from builder
|
||||
COPY --from=builder /lndhub /lndhub
|
||||
|
||||
# Delete git data as it's not needed inside the container
|
||||
RUN rm -rf .git
|
||||
|
||||
# Create logs folder and ensure permissions are set correctly
|
||||
RUN mkdir /lndhub/logs && chown -R lndhub:lndhub /lndhub
|
||||
|
||||
USER lndhub
|
||||
|
||||
ENV PORT=3000
|
||||
|
||||
Reference in New Issue
Block a user