Add docker-compose service

This commit is contained in:
Hongbo Wu
2022-11-21 10:36:41 +08:00
parent 7479222657
commit 1228efb70f
3 changed files with 21 additions and 4 deletions

View File

@ -149,3 +149,21 @@ services:
depends_on:
api:
condition: service_healthy
rule-handler:
build:
context: .
dockerfile: ./packages/rule-handler/Dockerfile
container_name: "omnivore-rule-handler"
ports:
- "9091:8080"
environment:
- PUBSUB_VERIFICATION_TOKEN=some_token
- PG_HOST=postgres
- PG_PORT=5432
- PG_USER=app_user
- PG_PASSWORD=app_pass
- PG_DB=omnivore
depends_on:
migrate:
condition: service_completed_successfully

View File

@ -12,9 +12,7 @@
"compile": "tsc",
"build": "tsc",
"start": "functions-framework --target=ruleHandler",
"dev": "concurrently \"tsc -w\" \"nodemon --watch ./build/ --exec npm run start\"",
"gcloud-deploy": "gcloud functions deploy rule-handler --gen2 --entry-point=ruleHandler --trigger-http --allow-unauthenticated --region=us-west2 --runtime nodejs14",
"deploy": "yarn build && yarn gcloud-deploy"
"dev": "concurrently \"tsc -w\" \"nodemon --watch ./build/ --exec npm run start\""
},
"devDependencies": {
"chai": "^4.3.6",
@ -26,6 +24,7 @@
"dotenv": "^16.0.1",
"firebase-admin": "^10.0.2",
"@sentry/serverless": "^6.16.1",
"pg": "^8.3.3",
"typeorm": "^0.3.4",
"typeorm-naming-strategies": "^4.1.0"
}

View File

@ -23,5 +23,5 @@ RUN yarn install --pure-lockfile --production
EXPOSE 8080
CMD ["yarn", "workspace", "@omnivore/text-to-speech-handler", "start"]
CMD ["yarn", "workspace", "@omnivore/text-to-speech-handler", "start_streaming"]