-
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
Showing
27 changed files
with
4,020 additions
and
6,691 deletions.
There are no files selected for viewing
File renamed without changes.
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,4 +1,4 @@ | ||
name: build-package | ||
name: build | ||
on: | ||
workflow_call: | ||
inputs: | ||
|
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,6 +1,5 @@ | ||
.env | ||
*.log | ||
api/gql | ||
api/media | ||
coverage | ||
dist | ||
|
This file was deleted.
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 |
---|---|---|
@@ -1,21 +1,26 @@ | ||
# Make sure to build this image using the root context, not "api" context | ||
FROM node:20-alpine AS base | ||
|
||
RUN npm i -g pnpm | ||
COPY package.json pnpm-lock.yaml ./ | ||
WORKDIR /rex | ||
RUN npm i -g pnpm@latest | ||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ | ||
COPY api/package.json ./api/ | ||
|
||
FROM base AS builder | ||
|
||
RUN pnpm install --frozen-lockfile | ||
|
||
COPY tsconfig.json ./ | ||
COPY src src | ||
WORKDIR /rex/api | ||
COPY api/tsconfig.json ./ | ||
COPY api/src src | ||
RUN pnpm build | ||
|
||
FROM base AS server | ||
|
||
RUN pnpm install --prod --frozen-lockfile | ||
|
||
COPY --from=builder dist dist | ||
COPY gql /gql | ||
ENV GRAPHQL_SCHEMA_DIRS=/gql | ||
WORKDIR /rex/api | ||
COPY --from=builder /rex/api/dist dist | ||
COPY gql gql | ||
ENV GRAPHQL_SCHEMA_DIRS=/rex/api/gql | ||
CMD node --enable-source-maps dist/main.js |
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,33 @@ | ||
import type { CodegenConfig } from "@graphql-codegen/cli"; | ||
|
||
const config: CodegenConfig = { | ||
schema: "../gql/*.gql", | ||
config: { | ||
maybeValue: "T | undefined", | ||
typesPrefix: "I", | ||
scalars: { | ||
DateTime: "Date", | ||
}, | ||
}, | ||
hooks: { | ||
afterAllFileWrite: "biome check --apply-unsafe", | ||
}, | ||
generates: { | ||
"src/graphql.ts": { | ||
plugins: ["typescript", "typescript-operations"], | ||
}, | ||
"src/graphql.sdk.ts": { | ||
documents: "src/**/*.sdk.gql", | ||
plugins: [ | ||
"typescript", | ||
"typescript-operations", | ||
"typescript-graphql-request", | ||
], | ||
config: { | ||
noExport: true, | ||
gqlImport: "graphql-request#gql", | ||
}, | ||
}, | ||
}, | ||
}; | ||
export default config; |
This file was deleted.
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
Oops, something went wrong.