Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added docker environment #1

Merged
merged 4 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM golang:alpine as builder
COPY . /go/src/lnaddrd
WORKDIR /go/src/lnaddrd
RUN go build

FROM alpine
MAINTAINER Frédéric Logier <fredix@protonmail.com>
COPY --from=builder /go/src/lnaddrd/lnaddrd /usr/bin/
RUN mkdir /usr/share/lnaddrd
WORKDIR /usr/share/lnaddrd

EXPOSE 3441

ENTRYPOINT ["lnaddrd","/usr/share/lnaddrd/lnaddrd.yaml"]
28 changes: 28 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## docker-compose.yml

Change your lnaddrd's volume and lnd's volume according your config:

* /your/volume/lnaddrd
* /your/volume/lnd

## lnaddrd.yaml

* change url_authority according your domain
* change lightning_address_usernames
* change short_description
* copy your icon.png to /your/volume/lnaddrd
* set your lnd host

## build

build your docker container with :

```sh
docker compose build
```

launch with

```sh
docker compose up -d
```
12 changes: 12 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
lnaddrd:
container_name: lnaddrd
restart: always
build:
context: ..
dockerfile: ./docker/Dockerfile
ports:
- 3441:3441
volumes:
- /your/volume/lnaddrd:/usr/share/lnaddrd:ro
- /your/volume/lnd:/usr/share/lnd:ro
42 changes: 42 additions & 0 deletions docker/lnaddrd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This configures how the webserver will bind and expose its HTTP stack.
# By default it serves unencrypted HTTP. Specify a TLS cert+key to serve
# clients over HTTPS instead.
webserver:
bind_address: 0.0.0.0:3441 # required
# tls_cert_file: /path/to/server.tls.cert # optional
# tls_key_file: /path/to/server.tls.key # optional

lnurl:
# This must be the base URL of your server.
url_authority: https://conduition.io # required

# Both of these will be included in the pay request metadata array.
# The icon_file can be either a PNG or a JPEG file.
short_description: "Donation to conduition" # optional
icon_file: /usr/share/lnaddrd/icon.png # required

# Determines the range of acceptable payment amounts.
max_pay_request_sats: 5000000000 # required
min_pay_request_sats: 100 # required

# Determines the expiry time of BOLT11 invoices we create.
# Defaults to whatever the remote LND instance uses by default.
invoice_expiry: "1h" # optional
# invoice_expiry: "20m"
# invoice_expiry: "100s"

# Accept lightning address requests for the following usernames.
lightning_address_usernames: # optional
- conduition

# Configure a connection to LND's REST API.
#
# You can find invoices.macaroon in: ~/.lnd/data/chain/bitcoin/mainnet/invoices.macaroon
# You can find LND's TLS certificate in: ~/.lnd/tls.cert
#
# Note that your LND certificate MUST have the 'host' field listed as a SAN.
# (hint: use the 'tlsextradomain' option in lnd.conf)
lnd:
host: conduition.io:8080 # required
macaroon_file: /usr/share/lnd/data/chain/bitcoin/mainnet/invoices.macaroon # required
tls_cert_file: /usr/share/lnd/tls.cert # required