WIP release

This commit is contained in:
Niko Abeler 2023-07-19 19:57:22 +02:00
parent cc5ecff2f0
commit 1bf817465c
4 changed files with 35 additions and 12 deletions

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 ./...