Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
natew committed Jan 27, 2025
1 parent ff9f429 commit ea977c6
Show file tree
Hide file tree
Showing 4 changed files with 271 additions and 7 deletions.
Empty file added apps/chat/kysely.config.ts
Empty file.
4 changes: 4 additions & 0 deletions apps/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@
"dev:tauri": "tauri dev",
"docker": "docker compose --env-file .env",
"ios": "expo run:ios",
"migrate": "",
"migrate:auth": "npx @better-auth/cli migrate --config ./src/better-auth/auth.ts",
"build:docker:app": "RUN=1 tsx ./src/ci/buildChatAppDocker.ts",
"sst:login": "aws sso login --sso-session=tamagui",
"sst:deploy:development": "sst deploy --stage development",
"sst:build:production": "yarn build:docker:app",
"sst:deploy:production": "sst deploy --stage production",
"sst:build-and-deploy:production": "yarn sst:build:production && yarn sst:deploy:production",
"seed": "tsx ./src/postgres/seed.ts",
"serve": "one serve",
"migrate-and-serve": "yarn migrate && yarn serve",
"zero": "yarn zero:build-schema && zero-cache --schema-file ./src/zero/zero-schema.json",
"zero:build-schema": "zero-build-schema -p ./src/zero/schema-build.ts -o ./src/zero/zero-schema.json"
},
Expand Down Expand Up @@ -84,6 +87,7 @@
"@types/aws-lambda": "8.10.147",
"@types/pg": "^8.11.10",
"dotenv": "^16.4.7",
"kysely-ctl": "^0.10.1",
"sst": "^3.4.46",
"tsx": "^4.19.0",
"unicode-emoji": "^2.6.0"
Expand Down
12 changes: 10 additions & 2 deletions apps/chat/sst.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { readFileSync } from 'node:fs'

const env = config()

console.log('got env', env.parsed)

export default $config({
app(input) {
return {
Expand Down Expand Up @@ -112,6 +110,16 @@ export default $config({
const connection = $interpolate`postgres://${db.username}:${db.password}@${db.host}:${db.port}`
const upstreamDbConnection = $interpolate`${connection}/${db.database}`

const migrations = cluster.addService(`migrations`, {
image: `ghcr.io/onejs/one/chat-migrations`,
cpu: '1 vCPU',
memory: '2 GB',
environment: {
POSTGRES_DB: upstreamDbConnection,
},
link: [db],
})

// // Common environment variables
const zeroSharedEnv = {
AWS_REGION: process.env.AWS_REGION!,
Expand Down
Loading

0 comments on commit ea977c6

Please sign in to comment.