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

front, gateway: supporting launching front from outside the gateway reverse proxy #9726

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

ElysaSrc
Copy link
Member

@ElysaSrc ElysaSrc commented Nov 15, 2024

For the developers working on macOS it can be a real pain to launch the front in a local fashion. Since we require the front to be served through the gateway, we must do gymnastics to serve the dev front.

This set of changes aims to solve this by providing a way to use the front from outside the stack, making it serve locally while consuming the services on the remote service (inside the Docker VM on macOS or windows, for instance).

In order to test this, start the stack in non-host mode, shutdown the front container and on your .env.local add:

VITE_PROXY_EDITOAST="http://localhost:4000/api"
VITE_PROXY_GATEWAY="http://localhost:4000"

Start the front locally, and it should work.

@ElysaSrc ElysaSrc requested review from a team as code owners November 15, 2024 11:32
@github-actions github-actions bot added area:front Work on Standard OSRD Interface modules area:gateway labels Nov 15, 2024
docker/gateway.dev.simple.toml Outdated Show resolved Hide resolved
gateway/src/main.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@Math-R Math-R left a comment

Choose a reason for hiding this comment

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

lgtm thanks for this one !

Signed-off-by: Élyse Viard <[email protected]>
@ElysaSrc ElysaSrc force-pushed the ev/front-nohost branch 2 times, most recently from bec89bc to b30124c Compare November 15, 2024 12:13
Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

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

LGTM for the front (not tested)

@ElysaSrc ElysaSrc force-pushed the ev/front-nohost branch 3 times, most recently from f8ca796 to f200be1 Compare November 15, 2024 15:58
@github-actions github-actions bot removed the area:front Work on Standard OSRD Interface modules label Nov 15, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.83%. Comparing base (ca256f7) to head (0b3c094).
Report is 12 commits behind head on dev.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #9726      +/-   ##
============================================
- Coverage     42.43%   37.83%   -4.60%     
============================================
  Files          1314      990     -324     
  Lines        105823    90920   -14903     
  Branches       3305     1176    -2129     
============================================
- Hits          44902    34404   -10498     
+ Misses        58968    56062    -2906     
+ Partials       1953      454    -1499     
Flag Coverage Δ
core ?
editoast 73.24% <ø> (-0.02%) ⬇️
front 20.11% <100.00%> (+1.32%) ⬆️
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 86.74% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ElysaSrc ElysaSrc force-pushed the ev/front-nohost branch 2 times, most recently from e1541e1 to 32847e5 Compare November 15, 2024 16:09
Merged via the queue into dev with commit 4b7e9d3 Nov 15, 2024
27 checks passed
@ElysaSrc ElysaSrc deleted the ev/front-nohost branch November 15, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants