VictorNine / bitwarden-go

A Bitwarden-compatible server written in Golang
MIT License
250 stars 33 forks source link

Allow setting a directory for the database and create tables only if they don't exists #8

Closed shackra closed 6 years ago

shackra commented 6 years ago

I add this change for the reason that I would like to set the location of the database somewhere else than ./, this is useful for binaries running inside a Docker container, we can save the database inside a Docker volume.

I also changed the SQL statement for creating the tables to create them only if they do not exist. This allow running the option -init more than once without triggering errors or breaking something in the database.

VictorNine commented 6 years ago

Looks good :) But there was some changes in the layout branch that was not merged. You needs a small update before I can pull

shackra commented 6 years ago

Then it seems I need to apply my changes on the layout branch, right?

VictorNine commented 6 years ago

No I've merged the layout changes to master

shackra commented 6 years ago

I have re-committed two of my changes in-sync with the changes you applied on master.

However, I have absolutely no idea how to compile the binary with this project structure so I don't know if my commits will work as intended.

ElCyborg commented 6 years ago

I've been meaning to add to the readme. You can build it by running 'go build' or 'go install' from the cmd/bitwarden-go/ folder where main.go resides.

VictorNine commented 6 years ago

If you click the red cross above you can see that the Travis build failed.

If you are interested you can read about the structure here “Repository organization tips in Go” https://medium.com/@cep21/package-proliferation-mistakes-in-go-493664cde6b9

shackra commented 6 years ago

Is it building correctly now, right? I don't see Travis

VictorNine commented 6 years ago

No more errors from Travis :) But you are pretty fare behind the master branch so it would take one more commit to merge it. I don't really like having commits width failing testes in the repo

VictorNine commented 6 years ago

Is this something you are planning to complete?

shackra commented 6 years ago

Sorry, I rebased my branch with master but something went wrong and I need to figure that out.

shackra commented 6 years ago

If Travis test these new commits and see everything is all right, the branch should be ready to be merge :)