diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3e835ab --- /dev/null +++ b/Dockerfile @@ -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"] + diff --git a/internal/users/data/repository.go b/internal/users/data/repository.go index adb2ffd..1f20cbc 100644 --- a/internal/users/data/repository.go +++ b/internal/users/data/repository.go @@ -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} }