-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit da8abc0
Showing
27 changed files
with
7,673 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Main | ||
MODULE_NAME='module' | ||
DEBUG='ndk:*,module:*' | ||
|
||
# Express HTTP Server | ||
PORT=3000 | ||
|
||
# Nostr settings | ||
NOSTR_PRIVATE_KEY="YOUR_NOSTR_PRIVATE_KEY" | ||
NOSTR_PUBLIC_KEY="The public key associated to the private key" | ||
NOSTR_RELAYS="wss://relay.damus.io,wss://relay.hodl.ar,wss://nostr.wine,wss://offchain.pub,wss://nostr-pub.wellorder.net,wss://nos.lol" | ||
NOSTR_WRITE_RELAY="" | ||
|
||
# Postgres settings | ||
DATABASE_URL="postgresql://root:root@localhost:5432/lawallet-extension" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
NOSTR_PRIVATE_KEY='82e59e17b3983b6c4246c6c87f3033b03b07d49fa13e82741beaf1a26e0ca381' | ||
NOSTR_PUBLIC_KEY='0ce32219d1fce60df30b59b2b3885edea84341444a422918ff8d6cf641ecfa6b' | ||
NOSTR_RELAYS='wss://relay.lawallet.ar,wss://relay.example.org' | ||
NOSTR_WRITE_RELAY='wss://write.relay.lawallet.ar' | ||
DEBUG='-module' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"env": { | ||
"jest": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/strict-type-checked", | ||
"prettier" | ||
], | ||
"ignorePatterns": ["pnpm-lock.yaml", "dist/"], | ||
"overrides": [ | ||
{ | ||
"files": ["tests/**"], | ||
"plugins": ["jest"], | ||
"extends": ["plugin:jest/recommended"], | ||
"rules": { | ||
"@typescript-eslint/unbound-method": "off", | ||
"jest/unbound-method": "error" | ||
} | ||
} | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "./tsconfig.eslint.json" | ||
}, | ||
"plugins": ["import", "@typescript-eslint"], | ||
"root": true, | ||
"rules": { | ||
"@typescript-eslint/no-non-null-assertion": 0, | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
"argsIgnorePattern": "^_", | ||
"varsIgnorePattern": "^_", | ||
"caughtErrors": "all", | ||
"caughtErrorsIgnorePattern": "^_", | ||
"destructuredArrayIgnorePattern": "^_" | ||
} | ||
] | ||
}, | ||
"settings": { | ||
"import/parsers": { | ||
"@typescript-eslint/parser": [".ts"] | ||
}, | ||
"import/resolver": { | ||
"typescript": {} | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Ignore hidden files | ||
.* | ||
# But pay attention to certain specific ones | ||
!.env.example | ||
!.env.test | ||
!.envrc | ||
!.eslintrc | ||
!.gitattributes | ||
!.gitconfig | ||
!.github | ||
!.gitignore | ||
!.gitkeep | ||
!/**/.gitkeep | ||
!.nvmrc | ||
!.pnp.cjs | ||
!.pnp.loader.mjs | ||
!.prettierignore | ||
!.prettierrc | ||
|
||
# Pipeline | ||
node_modules | ||
dist |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v20.11 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pnpm-lock.yaml |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"printWidth": 80, | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"overrides": [ | ||
{ | ||
"files": "*.ts", | ||
"options": { | ||
"parser": "typescript" | ||
} | ||
}, | ||
{ | ||
"files": "*.md", | ||
"options": { | ||
"parser": "markdown" | ||
} | ||
}, | ||
{ | ||
"files": "*.mdx", | ||
"options": { | ||
"parser": "mdx" | ||
} | ||
}, | ||
{ | ||
"files": "*.json", | ||
"options": { | ||
"parser": "json", | ||
"singleQuote": false, | ||
"tabWidth": 2, | ||
"trailingComma": "none" | ||
} | ||
}, | ||
{ | ||
"files": "*.{yml,yaml}", | ||
"options": { | ||
"parser": "yaml" | ||
} | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM node:20-alpine AS base | ||
|
||
RUN ["addgroup", "--system", "--gid", "1001", "nodejs"] | ||
RUN ["adduser" , "--system", "--uid", "1001", "nodejs"] | ||
|
||
|
||
FROM base AS dependencies | ||
|
||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. | ||
RUN ["apk", "add", "--no-cache", "libc6-compat"] | ||
WORKDIR /app | ||
COPY package.json pnpm-lock.yaml ./ | ||
COPY prisma/schema.prisma ./prisma/schema.prisma | ||
RUN ["npm", "i", "-g", "pnpm", "prisma"] | ||
RUN ["pnpm", "i", "--frozen-lockfile", "--prod"] | ||
RUN ["pnpm", "add", "-d", "esbuild@^0.20.0"] | ||
|
||
|
||
FROM base AS build | ||
|
||
WORKDIR /app | ||
COPY --from=dependencies /app/node_modules ./node_modules | ||
COPY . . | ||
RUN ["npm", "run", "build:prod"] | ||
|
||
|
||
FROM base AS runner | ||
|
||
WORKDIR /app | ||
COPY --from=build --chown=nodejs:nodejs /app/dist ./dist | ||
COPY --from=build /app/node_modules ./node_modules | ||
USER nodejs | ||
ENV NODE_ENV production | ||
ENV PORT 3000 | ||
EXPOSE 3000 | ||
|
||
ENTRYPOINT ["node", "dist/index.mjs"] |
Oops, something went wrong.