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

Set up to run LexBox alongside LF in dev mode #1790

Merged
merged 1 commit into from
May 6, 2024
Merged

Conversation

rmunn
Copy link
Collaborator

@rmunn rmunn commented Apr 9, 2024

Language Forge port changed to port 8080 so that port 80 can belong to local LexBox.

Fixes sillsdev/languageforge-lexbox#708

Description

Add appropriate environment variables to docker-compose.yml so that Language Forge can be run alongside a locally-installed copy of LexBox.

Screenshots

image

Checklist

  • I have labeled my PR with: bug, feature, engineering, security fix or testing
  • I have performed a self-review of my own code
  • I have reviewed the title & description of this PR which I will use as the squashed PR commit message
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have enabled auto-merge (optional)

Testing

To run:

To verify:

  • Go to http://localhost:8080 to run Language Forge
  • Click on "Get Project from Language Depot"
  • Type in username manager and password pass
  • Note the Sena-3 project is available
  • Run docker logs -f lfmerge to watch the clone process
  • Clone Sena-3
  • Go to My Projects and click on Sena-3
  • Check that all the entries are there

Language Forge port changed to port 8080 so that port 80 can belong to
local LexBox.
@rmunn rmunn added the engineering Tasks which do not directly relate to a user-facing feature or fix label Apr 9, 2024
@rmunn rmunn self-assigned this Apr 9, 2024
@rmunn rmunn requested a review from megahirt April 9, 2024 09:19
Copy link

github-actions bot commented Apr 9, 2024

Unit Test Results

362 tests   362 ✅  13s ⏱️
 37 suites    0 💤
  1 files      0 ❌

Results for commit bbd54f1.

@rmunn
Copy link
Collaborator Author

rmunn commented Apr 9, 2024

Tested on my machine and it works. Could clone a large project with embedded audio files, and verified that all entries were present and the audio files played correctly. Also tested with #1789 merged into this PR, which also cloned the same project correctly.

@myieye
Copy link
Collaborator

myieye commented Apr 25, 2024

I can't access 8080 consistently. I have no idea why. After every make [dev] it was always a mystery as to whether it would be available or not 🤷. I'm guessing it has something do to with my machine. But maybe someone else should try this? @hahn-kev

But it did hit my local lexbox when it worked. That was cool.

@rmunn
Copy link
Collaborator Author

rmunn commented Apr 26, 2024

I actually had the same problem yesterday, tried 8081 and it didn't work, tried 8083 and it worked. Have not yet determined why: nothing was listening on port 8080 (I checked), so there wasn't a port conflict. But somehow, Docker Compose just would not hook up port 8080, and didn't give me an error message explaining why.

@rmunn
Copy link
Collaborator Author

rmunn commented Apr 30, 2024

More weirdness from Docker Compose. I'm not seeing any bind: address already in use messages, but somehow the port mapping just won't bind. Change to another port, and it usually (usually) works... as long as that's a port I haven't used recently. If it's been recently used, no dice. Various issues like https://www.github.com/docker/compose/issues/11572 are being reported, but all of them report error messages. I'm seeing no error messages at all, just a port that silently fails to bind.

At the moment, I'm inclined to hold off on merging this PR, because the port weirdness makes it nearly unmanageable to do LF development: every time you run make, you have to manually edit docker-compose.yml to change a port and then run make again. Not worth the effort, IMHO.

Copy link
Collaborator

@megahirt megahirt left a comment

Choose a reason for hiding this comment

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

These changes look good. I know that we're dealing with port mapping weirdness but honestly I don't think it's due to these changes but rather to buggy docker compose behavior that exists regardless. I'd rather get this merged and continue figuring out how to make the two repos working together. Merging is a step in the right direction.

One thing I'm sure about is whether SvelteKit or something Svelte related in LF was running on 8080 already. I couldn't find any reference in our code to 8080 but it's possible it's the default for something that is not spelled out in code.

@rmunn
Copy link
Collaborator Author

rmunn commented May 6, 2024

There are no other references to port 8080, and Svelte-Kit's default port is 5173 or 4173 depending on if you're running the dev server (default port 5173) or the preview server (default port 4173). So using port 8080 won't conflict with anything internal. It might possibly conflict with the defaults of some other tools, and if it does, we can easily accept a new PR to change it to some arbitrarily-chosen port number. But I think sticking with 8080 will be fine.

@rmunn rmunn merged commit 160bdcf into develop May 6, 2024
17 checks passed
@rmunn rmunn deleted the feat/local-lexbox branch May 6, 2024 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engineering Tasks which do not directly relate to a user-facing feature or fix
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Set up Language Forge to run alongside LexBox
3 participants