v2 #43

Merged
h4kor merged 41 commits from v2 into main 2023-07-19 19:09:19 +00:00
4 changed files with 35 additions and 12 deletions
Showing only changes of commit 1bf817465c - Show all commits

33
Dockerfile Normal file
View File

@ -0,0 +1,33 @@
##
## Build Container
##
FROM golang:1.20-alpine as build
RUN apk add --no-cache git
WORKDIR /tmp/owl
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN go build -o ./out/owl ./cmd/owl
##
## Run Container
##
FROM alpine
RUN apk add ca-certificates
COPY --from=build /tmp/owl/out/ /bin/
# This container exposes port 8080 to the outside world
EXPOSE 8080
# Run the binary program produced by `go install`
ENTRYPOINT ["/bin/owl"]

2
release.sh Executable file
View File

@ -0,0 +1,2 @@
docker build . -t git.libove.org/h4kor/owl-blogs:$1
docker push git.libove.org/h4kor/owl-blogs:$1

View File

@ -1,6 +0,0 @@
#!/bin/bash
set -e
OWL_SECRET_KEY=test-secret-key \
go run owl-blogs/cmd/owl web

View File

@ -1,6 +0,0 @@
#!/bin/bash
set -e
OWL_SECRET_KEY=test-secret-key \
go test -v -coverprofile=coverage.out ./...