3factor-example
3factor-example copied to clipboard
Add docker-compose, fix missing sequelize package, fix CORS, document fix for event triggers
The main change in this pull request is the use of a docker-compose.yaml
configration for running the 3factor-example project (both Hasura and Postgres). This configuration is based on the 'official' one located at https://github.com/hasura/graphql-engine/blob/master/install-manifests/docker-compose/docker-compose.yaml.
The changes are:
- It's using the latest compose file format (
3.7
). - It specifies the Postgres version explicitly.
- It makes the Postgres database accessible from outside the Docker container on port
5432
. - It specifies container names to make it easier to run commands. For example, you could run
docker exec -i 3factor_postgres psql -U postgres postgres < schema.sql
to run an SQL file against the Postgres database.
The other changes in this pull request include:
- Fix missing
sequelize
package insrc/backend/package.json
. - Fix CORS issues (requests from order-app-frontend were being rejected by the Express server due to CORS).
- Document the fact that the event triggers included in
event-triggers.json
do not work out of the box on macOS and Windows due to the use oflocalhost
in the webhook URLs, and how to update the event triggers to get them working.
@jordanmkoncz Thanks! This is awesome ❤️ We'll take a quick look and see if we can merge this :) cc: @tirumaraiselvan
For what it is worth, lack of these changes made this much harder for me to try out on macOS as well. Running postgres on the Mac directly and then Hasura in Docker makes it hard to connect the two, and as noted in this PR the event triggers don't work out of the box, then you can't make payments in the app due to CORS.
I say this not to complain but to just give you another small push to get this merged. Thanks!