Skip to content
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

docs: Clarify how to setup Docker with custom Server File #10702

Merged
merged 3 commits into from
May 30, 2024

Conversation

dthyresson
Copy link
Contributor

@dthyresson dthyresson commented May 30, 2024

Clarify how to setup Docker with custom Server File.

While the Docker documentation does instruct how to user Docker with the custom server file, the instructions could be easily missed.

In the follow support issue https://community.redwoodjs.com/t/unknown-directive-live-in-docker/7150/7 redwoodJS was setup to use Docker and also GraphQL with Realtime.

Realtime (and live queries) worked with rw dev, api set and also Docker dev -- but not production Docker.

In production Docker, the server file was never run and therefore the plugin to setup GraphQL with the useRedwoodRealtime plugin never happened ... and thus the live directive wasn't understood nor were GraphQL subscripts added to the schema.

Here api server, simply ran the GraphQL function as expected, but the plugin was never invoked so Realtime was never configured or added to the schema.

This happened because by default, production Docker launch the plain vanilla api server -- it didn't launch server file that uses createServer to setup a separate GraphQL server and also add in the realtime plugin.

This PR:

  • adds comment to the Dockerfile to make one aware of the command change
  • suggests an alternative way of not using the default command in the production docker config
  • clarifies Docker docs to point to the config command change

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@dthyresson dthyresson self-assigned this May 30, 2024
@dthyresson dthyresson added this to the next-release-patch milestone May 30, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link

replay-io bot commented May 30, 2024

Status Starting
Commit 7c56cb4

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@dthyresson dthyresson marked this pull request as ready for review May 30, 2024 18:06
@dthyresson dthyresson requested a review from Josh-Walker-GM May 30, 2024 18:06
@Josh-Walker-GM Josh-Walker-GM merged commit a53600d into main May 30, 2024
46 checks passed
@Josh-Walker-GM Josh-Walker-GM deleted the dt-docs-clarify-docker-server-file-command-use branch May 30, 2024 21:54
Josh-Walker-GM pushed a commit that referenced this pull request May 30, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Clarify how to setup Docker with custom Server File.

While the Docker documentation does instruct how to user Docker with the
custom server file, the instructions could be easily missed.

In the follow support issue
https://community.redwoodjs.com/t/unknown-directive-live-in-docker/7150/7
redwoodJS was setup to use Docker and also GraphQL with Realtime.

Realtime (and live queries) worked with rw dev, api set and also Docker
dev -- but not production Docker.

In production Docker, the server file was never run and therefore the
plugin to setup GraphQL with the useRedwoodRealtime plugin never
happened ... and thus the live directive wasn't understood nor were
GraphQL subscripts added to the schema.

Here api server, simply ran the GraphQL function as expected, but the
plugin was never invoked so Realtime was never configured or added to
the schema.

This happened because by default, production Docker launch the plain
vanilla api server -- it didn't launch server file that uses
`createServer` to setup a separate GraphQL server and also add in the
realtime plugin.

This PR:

* adds comment to the Dockerfile to make one aware of the command change
* suggests an alternative way of not using the default command in the
production docker config
* clarifies Docker docs to point to the config command change
@Josh-Walker-GM Josh-Walker-GM modified the milestones: next-release, v7.7.0 Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants