Skip to content

Commit

Permalink
fix: API bootstrapping by making migrations available (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleortega authored Oct 28, 2024
1 parent 7c4d82f commit 8d2a860
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ contents
yarn-error.log
.env.local
*.log
api/src/migrations
3 changes: 2 additions & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"license": "Apache-2.0",
"version": "0.0.0",
"scripts": {
"build": "tsc -p tsconfig.json",
"build": "yarn copy-migrations && tsc -p tsconfig.json",
"copy-migrations": "cp -R ../processor/src/migrations ./src/migrations",
"start": "node --trace-warnings --abort-on-uncaught-exception --unhandled-rejections=strict dist/index.js",
"test": "jest --forceExit --detectOpenHandles --coverage --verbose --passWithNoTests",
"lint:check": "eslint '**/*.{js,ts}'",
Expand Down
2 changes: 1 addition & 1 deletion api/src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export async function initComponents(): Promise<AppComponents> {
{
migration: {
databaseUrl,
dir: path.resolve(__dirname, '../../processor/src/migrations'),
dir: path.resolve(__dirname, 'migrations'),
migrationsTable: 'pgmigrations',
ignorePattern: '.*\\.map',
direction: 'up'
Expand Down
9 changes: 7 additions & 2 deletions processor/.env.default
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
# PG_COMPONENT_PSQL_USER=''
# PG_COMPONENT_PSQL_PASSWORD=''

# CDN_HOST=''
# AWS_SNS_ARN=''
# AWS_SNS_ENDPOINT=''
# AWS_SQS_ENDPOINT=''
# AWS_SQS_ENDPOINT=''

# CDN_HOST=''
# CATALYST_CONTENT_URL_LOADBALANCER=''

HTTP_SERVER_PORT=3000
HTTP_SERVER_HOST=0.0.0.0

0 comments on commit 8d2a860

Please sign in to comment.