-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into recent_note_list_api
- Loading branch information
Showing
61 changed files
with
8,910 additions
and
5,777 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
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,28 @@ | ||
|
||
/* eslint-disable */ | ||
module.exports = { | ||
'extends': [ | ||
'codex/ts', | ||
], | ||
'plugins': [ 'vitest' ], | ||
'parserOptions': { | ||
'project': 'tsconfig.json', | ||
'tsconfigRootDir': __dirname, | ||
'sourceType': 'module', | ||
}, | ||
'rules': { | ||
'@typescript-eslint/naming-convention': [ | ||
'error', | ||
{ | ||
'selector': 'property', | ||
'format': ['camelCase', 'PascalCase'], | ||
'filter': { | ||
// Allow "2xx" as a property name, used in the API response schema | ||
'regex': '^(2xx)$', | ||
'match': false, | ||
}, | ||
}, | ||
], | ||
'jsdoc/require-returns-type': "off" | ||
}, | ||
}; |
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
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
v18.16.0 | ||
v20 |
Large diffs are not rendered by default.
Oops, something went wrong.
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,2 @@ | ||
yarnPath: .yarn/releases/yarn-3.6.4.cjs | ||
nodeLinker: node-modules |
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
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 |
---|---|---|
@@ -1,24 +1,29 @@ | ||
FROM node:18-alpine AS deps | ||
FROM node:20-alpine AS deps | ||
|
||
RUN apk add --no-cache libc6-compat | ||
WORKDIR /app | ||
COPY package.json package-lock.json ./ | ||
RUN npm install | ||
COPY package.json yarn.lock .yarnrc.yml ./ | ||
COPY .yarn/releases ./.yarn/releases | ||
RUN yarn install | ||
|
||
FROM node:18-alpine AS builder | ||
FROM node:20-alpine AS builder | ||
WORKDIR /app | ||
COPY . . | ||
COPY --from=deps /app/node_modules ./node_modules | ||
RUN npm run build | ||
RUN yarn build | ||
|
||
FROM node:18-alpine AS runner | ||
FROM node:20-alpine AS runner | ||
WORKDIR /usr/app | ||
|
||
COPY --from=builder /app/dist ./dist | ||
COPY package.json ./ | ||
RUN npm install | ||
COPY package.json yarn.lock .yarnrc.yml ./ | ||
COPY .yarn/releases ./.yarn/releases | ||
RUN yarn install | ||
COPY ./app-config.yaml . | ||
COPY ./migrations ./migrations | ||
COPY ./init.sh . | ||
|
||
USER node | ||
ENV NODE_ENV="production" | ||
CMD ["node", "dist/index.js"] | ||
|
||
CMD ["/bin/sh", "init.sh"] |
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
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
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 @@ | ||
version: "3.2" | ||
services: | ||
api: | ||
build: | ||
dockerfile: Dockerfile | ||
context: . | ||
ports: | ||
- 127.0.0.1:1337:1337 | ||
volumes: | ||
- ./app-config.yaml:/usr/app/app-config.yaml | ||
restart: unless-stopped | ||
|
||
postgres: | ||
image: postgres | ||
environment: | ||
POSTGRES_USER: codex | ||
POSTGRES_DB: notes | ||
POSTGRES_PASSWORD: postgres | ||
ports: | ||
- 127.0.0.1:5432:5432 | ||
volumes: | ||
- ./database:/var/lib/postgresql/data |
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,4 @@ | ||
#!/bin/sh | ||
set -e | ||
node dist/repository/storage/postgres/migrations/index.js -c app-config.yaml | ||
node dist/index.js |
Oops, something went wrong.