Skip to content

Comments

Feature/issue 203/url global variable#221

Merged
vladislav-k1 merged 7 commits intodevfrom
feature/issue-203/url-global-variable
Mar 21, 2025
Merged

Feature/issue 203/url global variable#221
vladislav-k1 merged 7 commits intodevfrom
feature/issue-203/url-global-variable

Conversation

@vladislav-k1
Copy link
Contributor

@vladislav-k1 vladislav-k1 commented Mar 18, 2025

Issue(s):

#203

Type of change:

  • New feature

Description:

  • The backend URL is now stored in frontend/src/assets/globalConstants.js and is referenced across entire frontend code instead of hardcoded strings.
  • By default, the backend port is 8080 and SSL is disabled by default. This behavior is overwritten in the CD runner.
  • Docker image is now using bind mounts to link the keystore.p12 file for deployment.
  • startServer.sh has been replaced with localExecute.sh to assemble frontend and execute the backend locally.

Additional context:

Pay extra attention to the CD runner.

Testing instructions:

For local execution:

  1. Checkout to this branch, merge from dev.
  2. Initialise the backend using the new localExecute.sh script.

For CD process validation:

  1. Push this code to the GHCR.
  2. Pull the image from GHCR to the server.
  3. Run the image in the container using the following parameters: -p 443:443 ghcr.io/spe-uob/2024-ailearningtool:latest -v keystore.p12:/keystore.p12

@vladislav-k1 vladislav-k1 linked an issue Mar 18, 2025 that may be closed by this pull request
1 task
@vladislav-k1 vladislav-k1 self-assigned this Mar 18, 2025
@vladislav-k1 vladislav-k1 added Backend Issue relates to backend code. Frontend Issue relates to frontend code. Final Issue relates to Final release. labels Mar 18, 2025
@vladislav-k1 vladislav-k1 added this to the Final Release milestone Mar 18, 2025
Copy link
Collaborator

@GerardChabaBristol GerardChabaBristol left a comment

Choose a reason for hiding this comment

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

The local execution works as intended. Unfortnately, I think the only way to test the CD would be to push to dev, but the changes you made to deploy-ghcr.yml make sense so I believe it would work.

Copy link
Contributor

@yi23484 yi23484 left a comment

Choose a reason for hiding this comment

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

Local execution works. Pushing to dev to test CD.

@vladislav-k1 vladislav-k1 merged commit 7f1bb5c into dev Mar 21, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend Issue relates to backend code. Final Issue relates to Final release. Frontend Issue relates to frontend code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Make server URL a global variable in frontend

3 participants