Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Address code smells in Dockerfile (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal authored Dec 20, 2023
1 parent 498b0fb commit 34d9be6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions db/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ func RunMigrationsDown(pg *pgxpool.Pool) error {
// the database updated with the latest changes in either direction,
// up or down.
func runMigrations(pg *pgxpool.Pool, direction migrate.MigrationDirection) error {
_db := stdlib.OpenDB(*pg.Config().ConnConfig)
db := stdlib.OpenDB(*pg.Config().ConnConfig)

var migrations = &migrate.PackrMigrationSource{Box: packrMigrations}
nMigrations, err := migrate.Exec(_db, "postgres", migrations, direction)
nMigrations, err := migrate.Exec(db, "postgres", migrations, direction)
if err != nil {
return err
}
Expand Down
6 changes: 5 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ RUN go mod download

# Build binary
COPY . .
RUN cd ./db && packr2 && cd ../

WORKDIR /go/src/github.com/0xPolygon/beethoven/db
RUN packr2

WORKDIR /go/src/github.com/0xPolygon/beethoven
RUN make build

# CONTAINER FOR RUNNING BINARY
Expand Down

0 comments on commit 34d9be6

Please sign in to comment.