expose port in dockerfile

This commit is contained in:
Dawid Wysokiński 2020-06-05 17:17:46 +02:00
parent 51e1df3b93
commit 00c63df35a
3 changed files with 10 additions and 0 deletions

View File

@ -13,6 +13,8 @@ COPY . .
RUN go build -o main .
EXPOSE 8080
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.2.1/wait ./wait
RUN chmod +x ./wait

View File

@ -33,6 +33,10 @@ func (repo *pgRepository) Fetch(ctx context.Context, server string, f *models.Pl
if f.Sort != "" {
query = query.Order(f.Sort)
}
if f.Exist != nil {
query = query.Where("exist = ?", *f.Exist)
}
}
total, err := query.SelectAndCount()

View File

@ -33,6 +33,10 @@ func (repo *pgRepository) Fetch(ctx context.Context, server string, f *models.Tr
if f.Sort != "" {
query = query.Order(f.Sort)
}
if f.Exist != nil {
query = query.Where("exist = ?", *f.Exist)
}
}
total, err := query.SelectAndCount()