Skip to content

Commit

Permalink
fix: heroku deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
froid1911 committed Jan 26, 2024
1 parent 59324eb commit 447b429
Show file tree
Hide file tree
Showing 8 changed files with 121 additions and 130 deletions.
5 changes: 4 additions & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ WORKDIR /app
COPY package.json .
COPY yarn.lock .
COPY Procfile .
COPY heroku.yml .
RUN yarn install --frozen-lockfile

FROM dependency-base AS production
Expand All @@ -28,4 +29,6 @@ RUN sed --in-place 's/sqlite/postgresql/g' ./prisma/schema.prisma
RUN npx prisma generate

# initialize db and start the app
ENTRYPOINT [ "npm", "run", "start" ]
RUN useradd -m myuser
USER myuser
CMD yarn start
1 change: 0 additions & 1 deletion api/Procfile

This file was deleted.

5 changes: 5 additions & 0 deletions api/heroku.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build:
docker:
switchboard-api: Dockerfile
run:
switchboard-api: yarn start
2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"version": "0.0.1",
"description": "Open-source API over database models made to be developer- and analyst-friendly.",
"author": "makerdao",
"type": "module",
"license": "AGPL-3",
"scripts": {
"dev": "vite-node -w src/index.ts",
"build": "npx prisma db push && tsc",
"start": "NODE_ENV=production vite-node src/index.ts",
"debug": "DEBUG=1 npm run dev",
"lint": "eslint \"./**/*.{ts,tsx}\" --max-warnings=0",
Expand Down
17 changes: 0 additions & 17 deletions api/src/generated/nexus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ export interface NexusGenObjects {
name?: string | null; // String
shortCode?: string | null; // String
}
Counter: { // root type
count: number; // Int!
message: string; // String!
}
DocumentDriveLocalState: { // root type
availableOffline: boolean; // Boolean!
sharingType?: string | null; // String
Expand Down Expand Up @@ -236,10 +232,6 @@ export interface NexusGenFieldTypes {
name: string | null; // String
shortCode: string | null; // String
}
Counter: { // field return type
count: number; // Int!
message: string; // String!
}
DocumentDriveLocalState: { // field return type
availableOffline: boolean; // Boolean!
sharingType: string | null; // String
Expand Down Expand Up @@ -306,7 +298,6 @@ export interface NexusGenFieldTypes {
Query: { // field return type
coreUnit: NexusGenRootTypes['CoreUnit'] | null; // CoreUnit
coreUnits: Array<NexusGenRootTypes['CoreUnit'] | null> | null; // [CoreUnit]
countUsers: NexusGenRootTypes['Counter'] | null; // Counter
drive: NexusGenRootTypes['DocumentDriveState'] | null; // DocumentDriveState
drives: Array<string | null> | null; // [String]
me: NexusGenRootTypes['User'] | null; // User
Expand Down Expand Up @@ -362,10 +353,6 @@ export interface NexusGenFieldTypeNames {
name: 'String'
shortCode: 'String'
}
Counter: { // field return type name
count: 'Int'
message: 'String'
}
DocumentDriveLocalState: { // field return type name
availableOffline: 'Boolean'
sharingType: 'String'
Expand Down Expand Up @@ -432,7 +419,6 @@ export interface NexusGenFieldTypeNames {
Query: { // field return type name
coreUnit: 'CoreUnit'
coreUnits: 'CoreUnit'
countUsers: 'Counter'
drive: 'DocumentDriveState'
drives: 'String'
me: 'User'
Expand Down Expand Up @@ -505,9 +491,6 @@ export interface NexusGenArgTypes {
coreUnit: { // args
id?: string | null; // String
}
countUsers: { // args
message: string; // String!
}
drive: { // args
id: string; // String!
}
Expand Down
6 changes: 0 additions & 6 deletions api/src/generated/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ type CoreUnit {
shortCode: String
}

type Counter {
count: Int!
message: String!
}

"""Date custom scalar type"""
scalar Date

Expand Down Expand Up @@ -152,7 +147,6 @@ type OperationUpdate {
type Query {
coreUnit(id: String): CoreUnit
coreUnits: [CoreUnit]
countUsers(message: String!): Counter
drive(id: String!): DocumentDriveState
drives: [String]
me: User
Expand Down
9 changes: 6 additions & 3 deletions api/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"compilerOptions": {
"strict": true,
"esModuleInterop": true
}
"strict": false,
"esModuleInterop": true,
"outDir": "./build",
"sourceMap": true
},
"include": ["./src"]
}
Loading

0 comments on commit 447b429

Please sign in to comment.