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

Instructions for setting up edit.tosdr.org on Windows #1111

Open
EarldridgeJazzedPineda opened this issue Apr 19, 2023 · 18 comments
Open

Instructions for setting up edit.tosdr.org on Windows #1111

EarldridgeJazzedPineda opened this issue Apr 19, 2023 · 18 comments

Comments

@EarldridgeJazzedPineda
Copy link

The quickstart guide (QUICKSTART.md) is only made for Linux or MacOS. I don't even use these operating systems on a regular basis, Microsoft Windows is my daily driver.

Windows is completely different compared to Linux and MacOS, so porting the guide is not easy, but to be clear, ToS;DR welcomes all users who use different kinds of operating systems.

Linux and MacOS account for only 23% of all desktop computers (statcounter), but Windows accounts for 69%.

With no guide for Windows, I would have to:

  • Follow the guide on the Windows Subsystem for Linux, or
  • Try to figure out the installation process myself

This is why I created this issue. This is to account for Phoenix contributors who use Microsoft Windows.

@JustinBack
Copy link
Member

Hey!

The QUICKSTART.md is pretty much outdated as we only support dockerized environments for now. Maybe @madoleary can give you instructions on how to run it on windows,

@EarldridgeJazzedPineda
Copy link
Author

EarldridgeJazzedPineda commented Apr 20, 2023

@madoleary I do not even know how to start contributing.
Should I run the install script using Windows Subsystem for Linux (WSL)?
Should I follow the manual environment setup using WSL?
Should I try to replicate the manual environment setup on the Windows system?
Should I install Docker?

@madoleary
Copy link
Contributor

Hi, thanks for your interest in the project! I've only ever worked in Linux or MacOS, so I've not had the opportunity to install the app in Windows. That said, I would suggest Docker. The docker-compose file in the main branch is out-of-date, though. I'm traveling at the moment, so I can't work on it immediately. I can perhaps take a look for early next week. You're welcome to hack around on the docker-compose, and if you figure it out, feel free to make a PR!

@EarldridgeJazzedPineda
Copy link
Author

EarldridgeJazzedPineda commented Apr 22, 2023 via email

@madoleary
Copy link
Contributor

That's a bummer. Another option would be to install the raw dependencies (Ruby v2.7.2, Rails v5.2.5, Bundler v2.2.6, Yarn, Postgres), then I can try to help with next steps.

@JustinBack
Copy link
Member

That's a bummer. Another option would be to install the raw dependencies (Ruby v2.7.2, Rails v5.2.5, Bundler v2.2.6, Yarn, Postgres), then I can try to help with next steps.

Its also possible to use Gitpod, as the repo contains a ready-to-use gitpod.yml

@EarldridgeJazzedPineda
Copy link
Author

@madoleary I already installed all the dependencies, everything you listed has a Windows version

@EarldridgeJazzedPineda
Copy link
Author

EarldridgeJazzedPineda commented Apr 22, 2023

After a few hours of installing dependencies, adjusting the Gemfile, and creating environment variables, I finally did it.
image

@EarldridgeJazzedPineda
Copy link
Author

But there was a problem.

When I tried to crawl ANY documents, I got this error:

It seems that our crawler wasn't able to retrieve any text.

Reason: The source document has not been updated. No changes made.
Region:
Stacktrace: SourceDocument

@JustinBack
Copy link
Member

Do you have a crawler instance running?

https://github.com/tosdr/crawler.tosdr.org

@EarldridgeJazzedPineda
Copy link
Author

How do I install a crawler?

@JustinBack
Copy link
Member

The crawler repository provides a compose file

https://github.com/tosdr/crawler.tosdr.org/blob/master/docker-compose.yml

Make sure to set your LOGIN_CREDENTIALS to anonymous@crawlers.tosdr.org:anonymous

@EarldridgeJazzedPineda
Copy link
Author

I already told you, Docker 4.18 is broken, I can't use Docker

@JustinBack
Copy link
Member

Running the crawler baremetal on a windows system was never tested and is officially not supported so you must run a selenium server and a crawler server yourself. The latter isnt that hard:

https://github.com/tosdr/crawler.tosdr.org/blob/master/Dockerfile

  1. Create a .env file
  2. install dependencies (npm install)
  3. Run crawler (node crawler.js)

As for selenium, you might wanna look into their documentation on how to run a selenium server

@EarldridgeJazzedPineda
Copy link
Author

Okay now, closing this issue.

@EarldridgeJazzedPineda
Copy link
Author

EarldridgeJazzedPineda commented Apr 28, 2023

One more thing, I don't how to setup the LOGIN_CREDENTIALS for the crawler, it was never documented. I put the login credentials for the admin account for the main Phoenix website, then I got this error:

********************** Booting ************************
** Reading .env **
** Authenticating with master server using provided credentials **
** Creating new Session **
********************** Failed to Boot ************************
** Failed to authenticate with master Server, please check your LOGIN_CREDENTIALS **
AppwriteException: Invalid credentials. Please check the email and password.

It also told me to adjust these two things in the crawler.js file:

.setEndpoint('https://appwrite.jrbit.de/v1') // Your API Endpoint
.setProject('6438e3173a7ec7628d22');               // Your project ID

But when I tried to set up a Appwrite account, I got this error:

The current project has exceeded the maximum number of users. Please check your user limit in the Appwrite console.

As I said, Docker is broken right now and I can't install Appwrite normally.

@JustinBack
Copy link
Member

You cannot create a new account and you'd have to use an anonymous crawler account:

Make sure to set your LOGIN_CREDENTIALS to anonymous@crawlers.tosdr.org:anonymous

@EarldridgeJazzedPineda
Copy link
Author

Crawler opens at 0.0.0.0:80, but ToS;DR expects 127.0.0.1:5000.
How to fix this?

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

No branches or pull requests

3 participants