floross/docker-readthedocs

Not working out of the box?

Opened this issue · 13 comments

After cloning the repos, I followed the README and made a my_org.env.
I didn't change anything in it, but the docker-compose up command fails.

It fails when it tries to build elastic-search:
ERROR: Service 'elasticsearch' failed to build: The command '/bin/sh -c /usr/share/elasticsearch/bin/plugin -install elasticsearch/elasticsearch-analysis-icu/1.7.0 --verbose' returned a non-zero code: 74 (and --verbose simpy says : UnknownHostException

This was tried in a ubuntu 18.04 machine.

Weirdly, it didn't fail on my mac, with mac os x 10.14 (Mojave).

Nevermind ... I'm stupid, and the reason it was not working was because of the Host machine's Firewall (Symantec) ...
It works.

Allright,
Maybe I closed too early.
It works, but when I try to login in the readthedocs server (yes, I created a user before, and if I try to recreate another user with the same email, it says a user with that email already exists), it stays in the login page, never go to the dashboard page. Any ideas why @floross ?

No idea about this error. This repo is a helper to build readthedocs but it only take the source from the official repo. Maybe this is an error from readthedocs itself ?

Well, I thought about this, but since this repo uses version 1.5 of RTD instead of the latest, I assumed that the rtd version would be functional.

I'll accept a pull request to update the RTD if you want to create one

Hi @jmcarter17, are you able to log in as admin?

Hi @Jmennius.
Well, I tried admin/admin and it gives me the same symptom ... it redirects to the login page again and again.

@jmcarter17 ok, logging in with admin/admin should work.

What address do you use to open a web page (I suspect some form of localhost)?
Did you configure RTD_PRODUCTION_DOMAIN in your env file?

I am asking because RTD_PRODUCTION_DOMAIN and the address you use to open the web page should match. See also #6.
To verify this is the issue (for default environment file) you can add docs.example.com to your hosts file and try to log in using this address.

@Jmennius yes, that is exactly it. Thanks a lot, it seems to be working now.
Do you have a contact info I could use to ask more questions if I'm in trouble again?
You could contact me on twitter, my handle is @jmcarter17

Allright, I know that this is again some more noise, but here is the error I'm running into now :

fatal: could not read Username for 'http://tfs2013:8080': terminal prompts disabled

I'm assuming that it is because the docker container doesn't have acces to the git credential-store of the machine it is running on ... Do you guys have any hints for that?

Is there a way to tell the credentials to RTD for this particular project? I know it would be much easier if the repo was on some gitlab, github or bitbucket ... but unfortunately, for now, the repo is on a TFS2013 server hosted on premises.

So I was able to fix my problem, but it feels like a hack.

I executed the command git config --global credentials.helper store (to use the credential store for git) inside the container.
Then I cloned a small repo in the container from the same TFS server, and I was able to enter the credentials.
Then i removed the newly cloned repo in the container.
After that, the builds worked because the credential store inside the container had my credentials. Done.

Like I said, that feels like a hack, do you guys have better solutions?

@jmcarter17 I don't have a non-hacky solution for that, although we need one..
One thing I can think of to start with is mounting the directory with a credential store and/or git config, this also applies to ssh private key for instance. With this approach, you don't have to manually run commands in the container (each time you create it).
I would use that until there is something better.