-
Notifications
You must be signed in to change notification settings - Fork 2
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
Brian/#229-env #237
Brian/#229-env #237
Conversation
…ed out during webpack build
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.
Looks fine, I didn't run it though. Will we need to change our run process?
Why not?
Yes. See the last paragraph of the description. |
Why not? Yes. See the last paragraph of the description. |
New library was added to allow for locally running instances of the server. Tries the parent and current directory for redundancy.
Bug exists with webpack builds and env loading. The env passed to the build container is not being picked up by the npm run build command. Further investigation is needed.
This path allows for both locally running instances and the full production build to succeed. Fix typo reported by gometalinter
07a41d1
to
aa870f3
Compare
Can you post what we should set those variables to? Both build for me but the client isn't reaching the server so I must have one of them wrong. |
Works for me with the env variables: |
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.
Should update the readme so it's easy for people to run. Maybe now it should say that you need the .env file and an example of what goes in it?
🎟️ Ticket(s): Closes #229
👷 Changes
Dev and Prod environments should only differ by a .env file now, which currently contains the following variables:
NODE_ENV
PORT
SERVER_URL
DATABASE_URL
Adding a new environment variable requires modifying the two docker-compose files hmmm. More work can be done here. The
make docker-start
has been removed due to some issues with Webpack (the production build specifically) not being able to pick up the environment variables from the build container. Due to this bug, in the production build, the .env is passed to the client container, while the server container receives the contents of the .env file through Docker-Compose as expected.🔦 Testing Instructions
Create a .env file with the variables mentioned above and place it in the root directory.
Then,
make client
andmake server