diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..61a0282 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,37 @@ +pipeline: + build: + when: + event: [push, pull_request, tag] + image: golang:1.19.3-alpine + commands: + - go mod download + - go build . + dockerize: + when: + branch: [main, master] + event: [push] + image: plugins/docker + settings: + registry: codeberg.org + repo: codeberg.org/odyssium/gothub + username: + from_secret: user + password: + from_secret: passwd + # password = key or actual password + tags: latest + dockerize-dev: + when: + event: [push] + branch: [dev] + image: plugins/docker + settings: + registry: codeberg.org + repo: codeberg.org/odyssium/gothub + username: + from_secret: user + password: + from_secret: passwd + # password = key or actual password + tags: dev + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a49f60c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine:latest +WORKDIR /gothub +COPY ./gothub . +COPY ./public/ ./public/ +COPY ./views/ ./views/ +CMD ["/bin/sh", "-c", "./gothub"] +EXPOSE 3000 diff --git a/main.go b/main.go index 78642b9..f1cefea 100644 --- a/main.go +++ b/main.go @@ -36,7 +36,7 @@ func main() { app := fiber.New(fiber.Config{ Views: engine, - Prefork: true, + Prefork: false, AppName: "GotHub", // fucked up way to fix rate limits EnableTrustedProxyCheck: true,