Skip to content

Commit 4a6ef2c

Browse files
authored
Merge pull request #7 from Edmartt/edmartt/misc/add-dockerfile
Edmartt/misc/add dockerfile
2 parents c217ca7 + d925a56 commit 4a6ef2c

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM golang:1.18-alpine
2+
3+
RUN apk add build-base
4+
5+
WORKDIR "/app"
6+
7+
ENV go env -w GO111MODULE=on
8+
ENV CGP_ENABLED=0
9+
ENV GOOS=linux
10+
ENV GOARCH=amd64
11+
12+
COPY go.mod .
13+
COPY go.sum .
14+
15+
RUN go mod download
16+
17+
COPY *.go .
18+
COPY . .
19+
20+
RUN go build ./... && go build
21+
22+
EXPOSE 8081
23+
24+
CMD ["./go-authentication-api"]
25+

internal/users/data/repository.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type UserRepository struct{
1414

1515
func NewRepository() *UserRepository{
1616
db := UserRepository{}
17-
db.DB = database.Postgres{}
17+
db.DB = database.SQLite{}
1818
return &UserRepository{DB: db.DB}
1919
}
2020

0 commit comments

Comments
 (0)