reactioncommerce / federated-gateway

An access aware federated GraphQL API gateway for the Reaction Commerce ecosystem
Apache License 2.0
6 stars 3 forks source link

chore: automatic npm install setup workaround #33

Closed ticean closed 4 years ago

ticean commented 4 years ago

The project failed to setup correctly on the first try. The ideal solution would be for the project image to contain the deps or build them during the build step, but this is a quick solution that doesn't require deep understanding of the node image.

To use this, I added an entry to my Reaction platform's config.local.mk:

define SUBPROJECT_REPOS
# other projects...
git@github.com:/reactioncommerce/federated-gateway.git,federated-gateway,trunk
endef

And then I can start the project with platform. All setup and npm installing runs automatically.

# from the platform directory
make init-federated-gateway

Breaking changes

None.

Testing

  1. Add federated-gateway to the platform's config.local.mk file.
    define SUBPROJECT_REPOS
    # other projects...
    git@github.com:/reactioncommerce/federated-gateway.git,federated-gateway,trunk
    endef
  2. cd <platform-directory>
  3. make clean-federated-gateway
  4. rm -R ./federated-gateway/node_modules to remove existing node modules.
  5. make init-federated-gateway
rosshadden commented 4 years ago

I'm going to close this because npm install should happen upon container startup as of https://github.com/reactioncommerce/docker-base/pull/24. It will probably require pulling in our latest base image.