mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fixes make run-docker (#471)
since the db files were being created inside of the docker container with only permissions for the root user to rwx and docker run needs all of $PWD to be readable in order to build a docker container on the host, `make run-docker` was broken on any subsequent runs. If we create more permissive permissions then we don't have that issue (group +rx)
This commit is contained in:
@@ -29,13 +29,13 @@ type BoltDatastore struct {
|
||||
func New(url *url.URL) (models.Datastore, error) {
|
||||
dir := filepath.Dir(url.Path)
|
||||
log := logrus.WithFields(logrus.Fields{"db": url.Scheme, "dir": dir})
|
||||
err := os.MkdirAll(dir, 0777)
|
||||
err := os.MkdirAll(dir, 0755)
|
||||
if err != nil {
|
||||
log.WithError(err).Errorln("Could not create data directory for db")
|
||||
return nil, err
|
||||
}
|
||||
log.Infoln("Creating bolt db at ", url.Path)
|
||||
db, err := bolt.Open(url.Path, 0600, &bolt.Options{Timeout: 1 * time.Second})
|
||||
db, err := bolt.Open(url.Path, 0655, &bolt.Options{Timeout: 1 * time.Second})
|
||||
if err != nil {
|
||||
log.WithError(err).Errorln("Error on bolt.Open")
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user