forked from ForumMagnum/ForumMagnum
-
Notifications
You must be signed in to change notification settings - Fork 4
Andrew Dev Notes
Andrew Roberts edited this page Jan 8, 2022
·
2 revisions
- Attempting to use Dockerfile to build and deploy (which uses
yarn run production): - The first failure when attempting to deploy was in
runProduction.sh, where I didn't specify any github credentials for the settings file- To resolve this issue, I need to specify a valid settings file to the
build.jsscript. EA & LW seem to do this by cloning an encrypted Credential file stored publicly on github. Which is encrypted using$TRANSCRYPT_SECRET - For the purpose of testing, I'm just going to use the
settings.jsonfile. All required env variables will be put in.env.examplequestions:- What is the structure of the ForumCredentials repository, and what is the structure of the
.envfile (or environment config in general) used by most developers?
- What is the structure of the ForumCredentials repository, and what is the structure of the
- To resolve this issue, I need to specify a valid settings file to the
- Another error was no
MONGO_URLin the environment, but this is pretty easy to solve, just add one.- we added
dotEnvto load environment variables locally
- we added
- Another error might be that ports 3000 and 3001 were not exposed?
- Deploy successful!
- "GraphQLError: Field error: value is not an instance of Date", on the RecentDiscussionFeed, which is a MixedTypeFeed, and requires a 'cutoff'. The 'cutoff' value does not seem to be a Date, which is required by the schema?
- Investigating further:
- It appears that the RecentDiscussionFeed Query returns data and an error (the above error), but for some reason, when using breakpoint, the data from the
useQuerycall is not actually given to the MixedFeedType component, it haserrorbut data remains undefined. This doesn't make sense because when executing the same API call against the server directly (using GraphiQL), both data and error are returned. - MixedTypeFeed, line 121
- It appears that the RecentDiscussionFeed Query returns data and an error (the above error), but for some reason, when using breakpoint, the data from the