🔪🐛 Fixed pnpm in Dockerfile, moved config to src
All checks were successful
Deploy application / deploy (push) Successful in 10s

This commit is contained in:
Martin Berg Alstad 2025-02-09 13:01:34 +01:00
parent c5b1ec20d6
commit 3c6cb193eb
Signed by: martials
GPG Key ID: A3824877B269F2E2
10 changed files with 16 additions and 11 deletions

View File

@ -4,7 +4,7 @@ httpRequests
.env.*
*.sqlite
jest.config.ts
node_modules
**/node_modules
.git
.gitignore
*.md

View File

@ -1,8 +1,14 @@
FROM node:22-slim
LABEL authors="Martin Berg Alstad"
COPY . .
COPY . ./app
WORKDIR ./app
RUN --mount=type=cache,id=npm,target=/store npm install --omit=dev --frozen-lockfile
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable pnpm
RUN corepack prepare pnpm@9.15.3 --activate
RUN npm i -g corepack@latest
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --recursive --frozen-lockfile
ENTRYPOINT ["npm", "run", "start-prod"]
ENTRYPOINT ["pnpm", "start-prod"]

View File

@ -2,7 +2,6 @@
"name": "sparebank1_actual_budget_integration",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "dotenvx run --env-file=.env.local -- node --import=tsx ./src/main.ts | ./packages/common/node_modules/pino-pretty/bin.js",
"start-prod": "node --import=tsx ./src/main.ts",

View File

@ -1,5 +1,5 @@
import pino from "pino"
import { LOG_LEVEL } from "@/../config.ts"
import { LOG_LEVEL } from "@/config.ts"
/**
* / Returns a logging instance with the default log-level "info"

View File

@ -4,7 +4,7 @@ import {
ACTUAL_PASSWORD,
ACTUAL_SERVER_URL,
ACTUAL_SYNC_ID,
} from "../config.ts"
} from "@/config.ts"
import type { TransactionEntity } from "@actual-app/api/@types/loot-core/types/models"
import { type UUID } from "node:crypto"
import logger from "@common/logger.ts"

View File

@ -2,7 +2,7 @@ import {
BANK_INITIAL_REFRESH_TOKEN,
BANK_OAUTH_CLIENT_ID,
BANK_OAUTH_CLIENT_SECRET,
} from "@/../config.ts"
} from "@/config.ts"
import logger from "@common/logger.ts"
import dayjs, { type Dayjs } from "dayjs"
import type { Database } from "better-sqlite3"

View File

@ -8,7 +8,7 @@ import {
DB_FILENAME,
TRANSACTION_RELATIVE_FROM_DATE,
TRANSACTION_RELATIVE_TO_DATE,
} from "../config.ts"
} from "@/config.ts"
import logger from "@common/logger.ts"
import type { UUID } from "node:crypto"
import { createDb } from "@/bank/db/queries.ts"

View File

@ -1,7 +1,7 @@
import type { UUID } from "node:crypto"
import dayjs from "dayjs"
import { type ActualTransaction } from "@/actual.ts"
import { ACTUAL_ACCOUNT_IDS, BANK_ACCOUNT_IDS } from "../config.ts"
import { ACTUAL_ACCOUNT_IDS, BANK_ACCOUNT_IDS } from "@/config.ts"
import logger from "@common/logger.ts"
import { toISODateString } from "@common/date.ts"
import type { SB1Transaction } from "@sb1/types.ts"

View File

@ -1,5 +1,5 @@
{
"include": ["./src/**/*.ts", "./tests/**/*.ts"],
"include": ["./src/**/*.ts", "./packages/**/*.ts", "./tests/**/*.ts"],
"compilerOptions": {
"target": "esnext",
"module": "ESNext",