-
Couldn't load subscription status.
- Fork 101
feat: initialize POS service #3509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🚀 Performance Test ResultsTest Configuration:
Test Metrics:
📜 Logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall. Just one nitpick I left a comment for, and one more thing I'd like for you to add.
Let's also add the POS service to the docker-compose for cloud nine wallet and happy life bank, like we did for the card service.
rafiki/localenv/cloud-nine-wallet/docker-compose.yml
Lines 3 to 34 in e0940e9
| cloud-nine-wallet-card-service: | |
| hostname: cloud-nine-wallet-card-service | |
| image: rafiki-card-service | |
| build: | |
| context: ../.. | |
| dockerfile: ./packages/card-service/Dockerfile.dev | |
| restart: always | |
| networks: | |
| - rafiki | |
| ports: | |
| - '3007:3007' | |
| volumes: | |
| - type: bind | |
| source: ../../packages/card-service/src | |
| target: /home/rafiki/packages/card-service/src | |
| read_only: true | |
| environment: | |
| NODE_ENV: ${NODE_ENV:-development} | |
| INSTANCE_NAME: CLOUD-NINE | |
| TRUST_PROXY: ${TRUST_PROXY} | |
| LOG_LEVEL: debug | |
| CARD_SERVICE_PORT: 3007 | |
| DATABASE_URL: postgresql://cloud_nine_wallet_card_service:cloud_nine_wallet_card_service@shared-database/cloud_nine_wallet_card_service | |
| depends_on: | |
| - shared-database | |
| healthcheck: | |
| test: ["CMD", "wget", "--spider", "http://localhost:3007/healthz"] | |
| start_period: 60s | |
| start_interval: 5s | |
| interval: 30s | |
| retries: 1 | |
| timeout: 3s |
| RUN chmod -R 750 /home/rafiki/packages | ||
|
|
||
| USER rafiki | ||
| CMD ["node", "-r", "/home/rafiki/packages/point-of-sale/dist/telemetry/index.js", "/home/rafiki/packages/point-of-sale/dist/index.js"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the POS service will publish telemetry data for now
…elemetry command from dockerfile
| INSTANCE_NAME: HAPPY-LIFE | ||
| TRUST_PROXY: ${TRUST_PROXY} | ||
| LOG_LEVEL: debug | ||
| CARD_SERVICE_PORT: 3007 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to change the env variable name to match the pos service's config, as well as update the port number so it doesn't conflict with the card service.
| networks: | ||
| - rafiki | ||
| ports: | ||
| - '3007:3007' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happy-life-bank should expose the port in the 4000 range
| INSTANCE_NAME: CLOUD-NINE | ||
| TRUST_PROXY: ${TRUST_PROXY} | ||
| LOG_LEVEL: debug | ||
| CARD_SERVICE_PORT: 3007 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto with the happy-life-bank comment, need to update the env var name and port number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for picking this up!
* feat(wip): pos service * Completed POS service init * Added docker files and missing scripts * Removed editor code after handling conflicts * Updated docker-compose for cloud 9 localenv and removed unnecessary telemetry command from dockerfile * Updated docker compose files for c9 and hlb * Updated ports and env var names from config * fix: install ts-node-dev, add main script to index.ts --------- Co-authored-by: Nathan Lie <[email protected]>
* feat(wip): pos service * Completed POS service init * Added docker files and missing scripts * Removed editor code after handling conflicts * Updated docker-compose for cloud 9 localenv and removed unnecessary telemetry command from dockerfile * Updated docker compose files for c9 and hlb * Updated ports and env var names from config * fix: install ts-node-dev, add main script to index.ts --------- Co-authored-by: Nathan Lie <[email protected]>
* feat(wip): pos service * Completed POS service init * Added docker files and missing scripts * Removed editor code after handling conflicts * Updated docker-compose for cloud 9 localenv and removed unnecessary telemetry command from dockerfile * Updated docker compose files for c9 and hlb * Updated ports and env var names from config * fix: install ts-node-dev, add main script to index.ts --------- Co-authored-by: Nathan Lie <[email protected]>
…backend (#3613) * feat: created the backbone for the card service (#3508) * Created the backbone for the card service * Format fix * feat: add card service to docker compose --------- Co-authored-by: Nathan Lie <[email protected]> * feat: initialize POS service (#3509) * feat(wip): pos service * Completed POS service init * Added docker files and missing scripts * Removed editor code after handling conflicts * Updated docker-compose for cloud 9 localenv and removed unnecessary telemetry command from dockerfile * Updated docker compose files for c9 and hlb * Updated ports and env var names from config * fix: install ts-node-dev, add main script to index.ts --------- Co-authored-by: Nathan Lie <[email protected]> * feat: Integrate Redis client in Card Service for (requestId, posServiceHost) mapping (#3524) * Integrate Redis client in Card Service for (requestId, posServiceHost) mapping * remove unused dep * prettier fix * Separate logging params from the message itself * ttl * prettier fix * Rewrite redis service tests to use testcontainers instead of mocks --------- Co-authored-by: Antoniu Neacsu <[email protected]> * feat(point-of-sale): added route for registering a POS device (#3555) * Route for registering a POS device * Fixed issue addressed in comments, tried to fix the port issue of jest * Changed test container port to 0, format fix * feat(wip): merge pos-card-services * feat(point-of-sale): handle incoming payment completed webhooks from backend * fix: typo, expose incoming payment url in gql * fix: typo & unintended changes * chore: regenerate gql * feat: clean up request map if wehbook times out --------- Co-authored-by: oana-lolea <[email protected]> Co-authored-by: zeppelin44 <[email protected]> Co-authored-by: Antoniu Neacsu <[email protected]>
Changes proposed in this pull request
Context
Fixes #3496
Checklist
fixes #numberuser-docslabel (if necessary)