Skip to content

Commit

Permalink
WIP: try to fix deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
schettn committed Jun 6, 2024
1 parent af7616e commit ea9feb3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 32 deletions.
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ WORKDIR /usr/src/pylon
# install dependencies into temp directory
# this will cache them and speed up future builds
FROM base AS install
ARG NODE_VERSION=20
RUN apt update \
&& apt install -y curl
RUN curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n \
&& bash n $NODE_VERSION \
&& rm n \
&& npm install -g n

RUN mkdir -p /temp/dev
COPY package.json bun.lockb /temp/dev/
Expand Down Expand Up @@ -50,6 +57,6 @@ COPY --from=prerelease /usr/src/pylon/package.json .
COPY --from=prerelease /usr/src/pylon/prisma prisma

# run the app
#USER bun
USER bun
EXPOSE 3000/tcp
ENTRYPOINT ["sh", "-c", "bun prisma migrate deploy && exec su bun -c 'bun run ./node_modules/.bin/pylon-server'"]
ENTRYPOINT [ "bun", "run", "./node_modules/.bin/pylon-server" ]
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@types/html-to-text": "^9.0.4",
"@types/nodemailer": "^6.4.15",
"@types/twig": "^1.12.9",
"bun-types": "^1.1.12",
"commitizen": "^4.2.5",
"git-cz": "^4.9.0",
"snek-query": "^0.0.110"
Expand Down
31 changes: 1 addition & 30 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
{
"compilerOptions": {
// project options
"lib": ["ES2020"], // specifies which default set of type definitions to use ("DOM", "ES6", etc)
"outDir": "dist", // .js (as well as .d.ts, .js.map, etc.) files will be emitted into this directory.,
"removeComments": true, // Strips all comments from TypeScript files when converting into JavaScript- you rarely read compiled code so this saves space
"target": "ES2020", // Target environment. Most modern browsers support ES6, but you may want to set it to newer or older. (defaults to ES3)
"module": "ESNext",


// Module resolution
"baseUrl": "./", // Lets you set a base directory to resolve non-absolute module names.
"esModuleInterop": true, // fixes some issues TS originally had with the ES6 spec where TypeScript treats CommonJS/AMD/UMD modules similar to ES6 module
"moduleResolution": "node", // Pretty much always node for modern JS. Other option is "classic"

// Source Map
"sourceMap": true, // enables the use of source maps for debuggers and error reporting etc
"sourceRoot": "/", // Specify the location where a debugger should locate TypeScript files instead of relative source locations.

// Strict Checks
"strictNullChecks": true, // When strictNullChecks is true, null and undefined have their own distinct types and you’ll get a type error if you try to use them where a concrete value is expected.

"declaration": true, // Generates a declaration .d.ts file for every .ts file.
"skipLibCheck": true, // Skip type checking of all declaration files (*.d.ts).
"allowSyntheticDefaultImports": true, // Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
// "resolveJsonModule": true, // Allow importing .json files
"typeRoots": ["node_modules/@types", "src/@types"], // Specify multiple folders that act like `./node_modules/@types`.
"types": ["node"],
"experimentalDecorators": true,
"resolveJsonModule": true
}
"extends": "@getcronit/pylon/tsconfig.pylon.json"
}

0 comments on commit ea9feb3

Please sign in to comment.