diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0190f60..0059aa1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -30,7 +30,7 @@ jobs: - name: 🥟 Setup bun uses: oven-sh/setup-bun@v1 with: - bun-version: "1.3.8" + bun-version: '1.3.8' - name: 📥 Download deps run: bun install --frozen-lockfile @@ -56,7 +56,7 @@ jobs: - name: 🥟 Setup bun uses: oven-sh/setup-bun@v1 with: - bun-version: "1.3.8" + bun-version: '1.3.8' - name: 📥 Download deps run: bun install --frozen-lockfile @@ -82,7 +82,7 @@ jobs: - name: 🥟 Setup bun uses: oven-sh/setup-bun@v1 with: - bun-version: "1.3.8" + bun-version: '1.3.8' - name: 📥 Download deps run: bun install --frozen-lockfile @@ -108,7 +108,7 @@ jobs: - name: 🥟 Setup bun uses: oven-sh/setup-bun@v1 with: - bun-version: "1.3.8" + bun-version: '1.3.8' - name: 📥 Download deps run: bun install --frozen-lockfile @@ -146,7 +146,7 @@ jobs: - name: 🥟 Setup bun uses: oven-sh/setup-bun@v1 with: - bun-version: "1.3.8" + bun-version: '1.3.8' - name: 📥 Download deps run: bun install --frozen-lockfile diff --git a/app/utils/cron-runner.server.ts b/app/utils/cron-runner.server.ts index ae2076a..783606a 100644 --- a/app/utils/cron-runner.server.ts +++ b/app/utils/cron-runner.server.ts @@ -3,6 +3,7 @@ import { clearIntervalAsync, setIntervalAsync, } from 'set-interval-async/dynamic' +import { getScheduleWindow } from './cron.server.ts' import { prisma } from './db.server.ts' import { getrecipientsforcron } from './prisma-generated.server/sql.ts' import { @@ -10,7 +11,6 @@ import { PREV_SCHEDULE_SENTINEL_DATE, } from './schedule-constants.server.ts' import { sendText, sendTextToRecipient } from './text.server.ts' -import { getScheduleWindow } from './cron.server.ts' const cronIntervalRef = remember<{ current: ReturnType | null diff --git a/app/utils/cron.server.test.ts b/app/utils/cron.server.test.ts index fe84610..d09d134 100644 --- a/app/utils/cron.server.test.ts +++ b/app/utils/cron.server.test.ts @@ -2,8 +2,8 @@ import '#tests/setup/setup-test-env.ts' import { faker } from '@faker-js/faker' import { expect, test } from 'bun:test' import { createMessage, createRecipient, createUser } from '#tests/db-utils.ts' -import { getScheduleWindow } from './cron.server.ts' import { sendNextTexts } from './cron-runner.server.ts' +import { getScheduleWindow } from './cron.server.ts' import { prisma } from './db.server.ts' test('does not send any texts if there are none to be sent', async () => { diff --git a/environment.json b/environment.json new file mode 100644 index 0000000..54beade --- /dev/null +++ b/environment.json @@ -0,0 +1,18 @@ +{ + "LITEFS_DIR": "/litefs/data", + "DATABASE_PATH": "./prisma/sqlite.db", + "DATABASE_URL": "file:./prisma/sqlite.db", + "CACHE_DATABASE_PATH": "./other/cache.db", + "SESSION_SECRET": "super-duper-s3cret", + "HONEYPOT_SECRET": "super-duper-s3cret", + "SENTRY_DSN": "your-dsn", + "INTERNAL_COMMAND_TOKEN": "some-made-up-token", + "ALLOW_INDEXING": "true", + "TWILIO_TOKEN": "your_twilio_token", + "TWILIO_SID": "your_twilio_sid", + "STRIPE_SECRET_KEY": "your_stripe_secret_key", + "STRIPE_BASIC_PAYMENT_LINK": "https://buy.stripe.com/some_id", + "STRIPE_BASIC_PRODUCT": "prod_some_id", + "STRIPE_PREMIUM_PAYMENT_LINK": "https://buy.stripe.com/some_id", + "STRIPE_PREMIUM_PRODUCT": "prod_some_id" +}