Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM golang:1.18-alpine

RUN apk add build-base

WORKDIR "/app"

ENV go env -w GO111MODULE=on
ENV CGP_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64

COPY go.mod .
COPY go.sum .

RUN go mod download

COPY *.go .
COPY . .

RUN go build ./... && go build

EXPOSE 8081

CMD ["./go-authentication-api"]

2 changes: 1 addition & 1 deletion internal/users/data/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type UserRepository struct{

func NewRepository() *UserRepository{
db := UserRepository{}
db.DB = database.Postgres{}
db.DB = database.SQLite{}
return &UserRepository{DB: db.DB}
}

Expand Down