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

README needs to be updated #13

Open
himankpathak opened this issue Mar 9, 2019 · 7 comments
Open

README needs to be updated #13

himankpathak opened this issue Mar 9, 2019 · 7 comments

Comments

@himankpathak
Copy link
Contributor

Readme is very unclear, and it took me a while to get things rolling.

Things needed to be fixed in README:

  • An important section like "requirements" should be on top of the readme followed by "starting the app" section, There is no use of docker-compose until you have the postgres database set up which is created by buffalo.

  • To add proper instruction to generate the JWT_Secret

  • To add instruction to install buffalo-plugins and buffalo-pop as they are not installed by default and you get the following error when running the script:
    Pop support has been moved to the https://github.com/gobuffalo/buffalo-pop plugin.

  • To add instruction to edit database.yml file, currently, user and password option have no significance and envOr calls the default from the url option (took me a while to figure this one out)

@alexdor please advise regarding this.

@alexdor
Copy link
Member

alexdor commented Mar 11, 2019

You are right that it needs to be updated, regarding your points:

  1. The requirements are on top of the local installation because they aren’t required if you run the app with docker. Docker compose includes the database and then Buffalo will migrate the database, so I’m not sure what do you mean that the docker-compose has no use before the Postgres is up and running.

  2. Yes you are right, it’s just a random string

  3. I think that this is for Buffalo 0.14.x, am I wrong?

  4. In theory the envOr call should override the above username and password but the password and the username should be the fallback, isn’t it working this way?

@himankpathak
Copy link
Contributor Author

Regarding the issues:

  1. I am not that familiar with docker-compose. I tried using docker-compose previously but I was not successful in running the app. I tried it today on a fresh install and it worked!
    Though installing the Dev Environment with docker-compose is still not working and I am getting following errors:
web_1  | buffalo: 2019/03/13 10:31:37 === Running: go build -v -i -tags development -o tmp/fixme-backend-build  (PID: 196) ===
web_1  | actions/app.go:12:2: cannot find package "github.com/rs/cors" in any of:
web_1  | 	/usr/local/go/src/github.com/rs/cors (from $GOROOT)
web_1  | 	/go/src/github.com/rs/cors (from $GOPATH)
web_1  | worker/helpers.go:10:2: cannot find package "github.com/shurcooL/githubv4" in any of:
web_1  | 	/usr/local/go/src/github.com/shurcooL/githubv4 (from $GOROOT)
web_1  | 	/go/src/github.com/shurcooL/githubv4 (from $GOPATH)
web_1  | worker/worker.go:16:2: cannot find package "golang.org/x/oauth2" in any of:
web_1  | 	/usr/local/go/src/golang.org/x/oauth2 (from $GOROOT)
web_1  | 	/go/src/golang.org/x/oauth2 (from $GOPATH)
web_1  | buffalo: 2019/03/13 10:31:37 === Error! ===
web_1  | buffalo: 2019/03/13 10:31:37 === exit status 1
web_1  | actions/app.go:12:2: cannot find package "github.com/rs/cors" in any of:
web_1  | 	/usr/local/go/src/github.com/rs/cors (from $GOROOT)
web_1  | 	/go/src/github.com/rs/cors (from $GOPATH)
web_1  | worker/helpers.go:10:2: cannot find package "github.com/shurcooL/githubv4" in any of:
web_1  | 	/usr/local/go/src/github.com/shurcooL/githubv4 (from $GOROOT)
web_1  | 	/go/src/github.com/shurcooL/githubv4 (from $GOPATH)
web_1  | worker/worker.go:16:2: cannot find package "golang.org/x/oauth2" in any of:
web_1  | 	/usr/local/go/src/golang.org/x/oauth2 (from $GOROOT)
web_1  | 	/go/src/golang.org/x/oauth2 (from $GOPATH)
  1. We can just add info about this so people can fast forward.

  2. Yea, you're absolutely right. I am working on the issue to upgrade to buffalo 0.14.1 and currently hit a wall. I will post update about it on the particular issue. We would be also require to update readme with new instructions for 0.14.x

  3. In theory yes, but it is not working, the only way I was able to connect it my postgres server was changing the password of my user 'postgres' to 'postgres'. I read in the buffalo db config docs that the url param for a connection will override any other connection param.

@himankpathak
Copy link
Contributor Author

I am also getting this error couldn't get key: could not find ENV var with JWT_SECRET

while running buffalo task db:seed

I have random JWT string set in dev.docker-compose.yml and docker-compose.yml

@alexdor
Copy link
Member

alexdor commented Mar 13, 2019

Do you want to open a pr with the proposed changes so we can comment on the pr?

The error that you posted here #13 (comment) looks like it can't find a package, so maybe smth when wrong during the package installation

In order for the docker-compose environment variables to be read you need to run the command inside the docker container. When you run buffalo task db:seed the command is executed on your local machine not inside the docker container that's why you get the error about not founding the JWT_SECRET.

@himankpathak
Copy link
Contributor Author

Yea sure @alexdor that would be nice.

yea I fixed this issue, It was due to some go dep package problem.

we should also include steps to create the docker container as well.

@himankpathak
Copy link
Contributor Author

Hi @alexdor, sorry for the delay with #12 I was busy because of my university end semester exams.
I created a docker image but while running the docker image with docker run -p 8080:8080 go-docker
I am getting the same error as before
2019/04/20 16:51:00 couldn't get key: could not find ENV var with JWT_SECRET
2019/04/20 16:51:00 couldn't get key: could not find ENV var with JWT_SECRET

@alexdor
Copy link
Member

alexdor commented Jun 11, 2019

Hello @himankpathak, sorry for the delay. You need to set this environment variables in order for the application to boot https://github.com/ossn/fixme_backend/blob/master/dev.docker-compose.yml#L18

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

2 participants