Add Dockerfile (#8)

Co-authored-by: fiatjaf_ <fiatjaf@gmail.com>
This commit is contained in:
0xtr
2023-10-19 13:43:16 +02:00
committed by GitHub
parent 9037b60663
commit 9882be5cb6
2 changed files with 34 additions and 1 deletions

24
Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
FROM golang:1.21.2 as builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o main .
####
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /app/main .
CMD ["./main"]

View File

@@ -7,4 +7,13 @@ njump has some special features to effectively share notes on platforms that off
njump currently lives under [njump.me](https://njump.me), you can reach it appending a Nostr NIP-19 entity (npub, nevent, nprofile, naddr, etc.) or a NIP-05 address after the domain, e.g. `njump.me/nevent1xxxxxx...xxx` or `njump.me/xxxx@zzzzz.com`
For more information about njump's philosophy and its use, read the presentation [on the homepage](https://njump.me).
For more information about njump's philosophy and its use, read the presentation [on the homepage](https://njump.me).
Docker
=====
To build and run in a Docker container:
```bash
docker build -t njump .
docker run -e DOMAIN=njump.mydomain.com -p 2999:2999 njump
```