Skip to content

Commit

Permalink
Ensure proper permissions and log migrations location
Browse files Browse the repository at this point in the history
  • Loading branch information
brycekahle committed Jan 24, 2018
1 parent 711209a commit 7d95e3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Expand Up @@ -7,8 +7,8 @@ FROM alpine:3.7
RUN apk add --no-cache ca-certificates
RUN adduser -D -u 1000 netlify && mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
USER netlify
COPY --from=0 /go/src/github.com/netlify/gotrue/gotrue /usr/local/bin/gotrue
COPY --from=0 /go/src/github.com/netlify/gotrue/migrations /usr/local/etc/gotrue/migrations/
COPY --chown=netlify --from=0 /go/src/github.com/netlify/gotrue/gotrue /usr/local/bin/gotrue
COPY --chown=netlify --from=0 /go/src/github.com/netlify/gotrue/migrations /usr/local/etc/gotrue/migrations/

ENV GOTRUE_DB_MIGRATIONS_PATH /usr/local/etc/gotrue/migrations
CMD ["gotrue"]
1 change: 1 addition & 0 deletions cmd/migrate_cmd.go
Expand Up @@ -50,6 +50,7 @@ func migrate(cmd *cobra.Command, args []string) {
logrus.Fatalf("%+v", errors.Wrap(err, "checking database connection"))
}

logrus.Infof("Reading migrations from %s", globalConfig.DB.MigrationsPath)
mig, err := pop.NewFileMigrator(globalConfig.DB.MigrationsPath, db)
if err != nil {
logrus.Fatalf("%+v", errors.Wrap(err, "creating db migrator"))
Expand Down

0 comments on commit 7d95e3f

Please sign in to comment.