Open himankpathak opened 5 years ago
You are right that it needs to be updated, regarding your points:
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.
Yes you are right, it’s just a random string
I think that this is for Buffalo 0.14.x, am I wrong?
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?
Regarding the issues:
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)
We can just add info about this so people can fast forward.
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
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.
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
Do you want to open a pr with the proposed changes so we can comment on the pr?
The error that you posted here https://github.com/ossn/fixme_backend/issues/13#issuecomment-472372701 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.
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.
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
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
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
andpassword
option have no significance andenvOr
calls the default from theurl
option (took me a while to figure this one out)@alexdor please advise regarding this.