Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Please add some docs on how to run lgtm #29

Open
calind opened this issue Feb 18, 2017 · 9 comments
Open

Please add some docs on how to run lgtm #29

calind opened this issue Feb 18, 2017 · 9 comments

Comments

@calind
Copy link

calind commented Feb 18, 2017

I've tired using docker image with docker run -d -p 8000:8000 -e DEBUG=true gitea/lgtm but it doesn't look to start up and docker logs say:

DEBU[0000] Driver sqlite3
DEBU[0000] Data Source /var/lib/lgtm/lgtm.sqlite
INFO[0000] database ping failed. retry in 1s
INFO[0001] database ping failed. retry in 1s
INFO[0002] database ping failed. retry in 1s
INFO[0003] database ping failed. retry in 1s
INFO[0004] database ping failed. retry in 1s
INFO[0005] database ping failed. retry in 1s
INFO[0006] database ping failed. retry in 1s
INFO[0007] database ping failed. retry in 1s
INFO[0008] database ping failed. retry in 1s
INFO[0009] database ping failed. retry in 1s
INFO[0010] database ping failed. retry in 1s
INFO[0011] database ping failed. retry in 1s
INFO[0012] database ping failed. retry in 1s
INFO[0013] database ping failed. retry in 1s
INFO[0014] database ping failed. retry in 1s
INFO[0015] database ping failed. retry in 1s
INFO[0016] database ping failed. retry in 1s
INFO[0017] database ping failed. retry in 1s
INFO[0018] database ping failed. retry in 1s
INFO[0019] database ping failed. retry in 1s
INFO[0020] database ping failed. retry in 1s
INFO[0021] database ping failed. retry in 1s
INFO[0022] database ping failed. retry in 1s
INFO[0023] database ping failed. retry in 1s
INFO[0024] database ping failed. retry in 1s
INFO[0025] database ping failed. retry in 1s
INFO[0026] database ping failed. retry in 1s
INFO[0027] database ping failed. retry in 1s
INFO[0028] database ping failed. retry in 1s
INFO[0029] database ping failed. retry in 1s
ERRO[0030] unable to open database file
FATA[0030] database ping attempts failed
@tboerger
Copy link
Member

Looks like you are on some redhat system? Add a :z to the volume.

Please note that this project is not maintained on the long term by us, we will launch our own gitea instance soon and than we will drop this tool.

@strawd
Copy link

strawd commented Mar 3, 2017

FYI I got the same errors on CentOS and it turned out to be SELinux for me

@tboerger
Copy link
Member

tboerger commented Mar 3, 2017

Just add something like --volume /my/host/path:/var/lib/lgtm:z and it should work fine on CentOS and other RedHat derivates.

@Lerentis
Copy link

Lerentis commented Jun 8, 2017

adding the volume fixes the database ping error for me, but i cant login after that. everything just ends in a github 404. am i missing something else?

@tboerger
Copy link
Member

tboerger commented Jun 9, 2017

A GitHub 404? What do you mean?

@Lerentis
Copy link

Lerentis commented Jun 9, 2017

after i start the docker container as mentioned before, i get this web ui
sign-in

If i click on sign in, i get redirected to this link, which results in a 404
404

like i said, i think i am missing something here, but i can't find any documentation :/

Offtopic: tboerger you are really working on a lot of projects. i feel like i have seen your name constantly over the last months :D

@Lerentis
Copy link

okay i see now what i have missed. you are working with the github oauth api and don't provide a way of how to set the oauth client id and secret (at least i could not find any), as well as there is no clear way to figure out the callback url to register a new oauth application in general (it is crafted in this function ).

@tboerger
Copy link
Member

You can see at https://github.com/go-gitea/infrastructure/blob/master/ansible/roles/lgtm/templates/service.j2#L17-L25 how we are launching this container, just provide the required environment variables and the redirect URL should be something like https://lgtm.gitea.io/login.

Offtopic: tboerger you are really working on a lot of projects. i feel like i have seen your name constantly over the last months :D

Yeah I'm pretty active in the Go world, maybe it's too much from time to time :P

@Lerentis
Copy link

that works perfectly thanks (:
for future reference:
create new OAuth Application here and fill environment variables for a minimal functionality.

docker run --name lgtm -v /my/host/path:/var/lib/lgtm:z -e GITHUB_CLIENT= -e GITHUB_SECRET= -p 8000:8000 gitea/lgtm

should be mentioned in the readme. i can write something down and create a pull request if you'd like

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants