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

Fixing breaking prod issues w/ client hardcoded IP and client dockerization #82

Merged
merged 4 commits into from Apr 3, 2024

Conversation

EricLi-Dev
Copy link
Collaborator

Changes:

  1. client/Dockerfile & docker-compose.yml
  • We had issues dockerizing the frontend container in production as the service just hangs on npm install packages. I switched the Docker image to a more compatible version from this github issue.
  • Also changed to build the frontend container on a linux platform
  1. client/Api/UsersApi.jsx
  • Whenever we changed the IP of the server (for a reboot or some other problems), the previous hardcoded IP would break login and signup functionality.
  • Changed it to take the IP from a variable in .env
  1. README.md
  • Documented where to include .env and IP address for the above change to work.
  1. client/components/profile.jsx
  • Had a problem w/ npm run build with the escape character for "{username}'s profile". Small change to fix issue.

Demo:
After adding the IP in client/.env. Using Jubayer's example profile that currently lives in the production DB.

a) npm run build && npm run start - Starts the frontend on production so logins and signup hit the production DB
image

b) npm run build && npm run dev - Starts the frontend on development so logins and signup hit the local DB.
image

Copy link
Contributor

@George-Sucuzhanay George-Sucuzhanay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the readme looks great and good catch on profile component bug

Copy link
Collaborator

@Dulinag Dulinag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@EricLi-Dev EricLi-Dev merged commit 41011ec into dev Apr 3, 2024
@EricLi-Dev EricLi-Dev deleted the hotfix/breaking_prod_fixes branch April 3, 2024 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants