Skip to content

Commit

Permalink
fix: docker deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Oct 7, 2024
1 parent 5c1393c commit 1b1c0a9
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
fly.toml
node_modules

4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ EXPOSE 8080

WORKDIR /app

USER deno

COPY . .

USER deno

CMD ["task", "start"]
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ A minimal LNURL + Zapper service powered powered by [NWC](https://nwc.dev)

## Deployment

### Docker (from Alby's Container Registry)

`docker run -p 8080:8080 --pull always ghcr.io/getalby/lite:latest`

### Docker (from source)

docker run -p 8080:8080 $(docker build -q .)

### Deploy on Fly

- `fly deploy`

## TODOs
Expand Down
10 changes: 1 addition & 9 deletions fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,4 @@ primary_region = 'lax'
[[vm]]
memory = '1gb'
cpu_kind = 'shared'
cpus = 1

[[mounts]]
source = 'app'
destination = '/app'
initial_size = '1'
auto_extend_size_threshold = 80
auto_extend_size_increment = "1GB"
auto_extend_size_limit = "5GB"
cpus = 1
1 change: 0 additions & 1 deletion package.json

This file was deleted.

9 changes: 5 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Hono } from "hono";
import { serveStatic } from "hono/deno";
import { secureHeaders } from "hono/secure-headers";
import { sentry } from "npm:@hono/sentry";
//import { sentry } from "npm:@hono/sentry";
import { PORT } from "./constants.ts";
import { DB, runMigration } from "./db/db.ts";
import { createLnurlApp } from "./lnurlp.ts";
Expand All @@ -15,15 +15,16 @@ const db = new DB();
const nwcPool = new NWCPool(db);
await nwcPool.init();

const SENTRY_DSN = Deno.env.get("SENTRY_DSN");
// TODO: re-enable sentry
//const SENTRY_DSN = Deno.env.get("SENTRY_DSN");

const hono = new Hono();

hono.use(loggerMiddleware());
hono.use(secureHeaders());
if (SENTRY_DSN) {
/*if (SENTRY_DSN) {
hono.use("*", sentry({ dsn: SENTRY_DSN }));
}
}*/

hono.route("/.well-known/lnurlp", createLnurlApp(db));
hono.route("/users", createUsersApp(db, nwcPool));
Expand Down
4 changes: 0 additions & 4 deletions yarn.lock

This file was deleted.

0 comments on commit 1b1c0a9

Please sign in to comment.