Add docker-compose service
This commit is contained in:
@ -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
|
||||
|
||||
@ -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"
|
||||
}
|
||||
|
||||
@ -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"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user