Skip to content

Commit

Permalink
chore: added required env vars to dockercompose and removed run-produ…
Browse files Browse the repository at this point in the history
…ction bin file
  • Loading branch information
geclos committed Sep 19, 2024
1 parent 287e7a1 commit b95a189
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 28 deletions.
13 changes: 0 additions & 13 deletions apps/gateway/docker/run-production.sh

This file was deleted.

13 changes: 0 additions & 13 deletions apps/workers/docker/run-production.sh

This file was deleted.

25 changes: 25 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,20 @@ services:
dockerfile: apps/gateway/docker/Dockerfile
profiles: [building]
environment:
- CACHE_HOST=redis
- DATABASE_URL=postgresql://latitude:secret@db:5432/latitude
- DEFAULT_PROJECT_ID=1
- DEFAULT_PROVIDER_API_KEY=test
- [email protected]
- LATITUDE_DOMAIN=web
- LATITUDE_URL=http://web:8080
- NODE_ENV=production
- QUEUE_HOST=redis
- WEBSOCKETS_SERVER=websockets
- WEBSOCKET_REFRESH_SECRET_TOKEN_KEY=test
- WEBSOCKET_SECRET_TOKEN_KEY=test
- WORKERS_WEBSOCKET_SECRET_TOKEN=test
- HOSTNAME=localhost
depends_on:
- db
- redis
Expand All @@ -51,7 +64,19 @@ services:
dockerfile: apps/workers/docker/Dockerfile
profiles: [building]
environment:
- CACHE_HOST=redis
- DATABASE_URL=postgresql://latitude:secret@db:5432/latitude
- DEFAULT_PROJECT_ID=1
- DEFAULT_PROVIDER_API_KEY=test
- [email protected]
- LATITUDE_DOMAIN=web
- LATITUDE_URL=http://web:8080
- NODE_ENV=production
- QUEUE_HOST=redis
- WEBSOCKETS_SERVER=websockets
- WEBSOCKET_REFRESH_SECRET_TOKEN_KEY=test
- WEBSOCKET_SECRET_TOKEN_KEY=test
- WORKERS_WEBSOCKET_SECRET_TOKEN=test
depends_on:
- db
- redis
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { LogSources } from '@latitude-data/core/browser'
import { LogSources, Providers } from '@latitude-data/core/browser'
import * as factories from '@latitude-data/core/factories'
import { Result } from '@latitude-data/core/lib/Result'
import { providersEnum } from '@latitude-data/core/schema'

Check failure on line 4 in packages/jobs/src/job-definitions/batchEvaluations/runDocumentJob.test.ts

View workflow job for this annotation

GitHub Actions / lint (20.x)

'providersEnum' is defined but never used. Allowed unused vars must match /^_/u
import { runDocumentAtCommit } from '@latitude-data/core/services/commits/runDocumentAtCommit'
import { env } from '@latitude-data/env'
import { Job } from 'bullmq'
Expand Down Expand Up @@ -48,7 +49,10 @@ describe('runDocumentJob', () => {

// Create necessary resources using factories
const setup = await factories.createProject({
documents: { 'test-doc': 'Test content' },
providers: [{ type: Providers.OpenAI, name: 'Latitude' }],
documents: {
'test-doc': factories.helpers.createPrompt({ provider: 'Latitude' }),
},
})
workspace = setup.workspace
project = setup.project
Expand Down

0 comments on commit b95a189

Please sign in to comment.