Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
832e11e70b | |||
27379b50fa |
@ -1,7 +1,7 @@
|
||||
pipeline:
|
||||
build:
|
||||
when:
|
||||
event: [push, pull_request, tag]
|
||||
event: [push, pull_request]
|
||||
image: golang:1.19.3-alpine
|
||||
commands:
|
||||
- go mod download
|
||||
@ -12,25 +12,23 @@ pipeline:
|
||||
event: [push]
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.projectsegfau.lt
|
||||
repo: git.projectsegfau.lt/midou/gothub
|
||||
repo: odyssey/gothub
|
||||
username:
|
||||
from_secret: user
|
||||
from_secret: docker_user
|
||||
password:
|
||||
from_secret: passwd
|
||||
from_secret: docker_passwd
|
||||
# password = key or actual password
|
||||
tags: latest
|
||||
auto_tag: true
|
||||
dockerize-dev:
|
||||
when:
|
||||
event: [push]
|
||||
branch: [dev]
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.projectsegfau.lt
|
||||
repo: git.projectsegfau.lt/midou/gothub
|
||||
repo: odyssey/gothub
|
||||
username:
|
||||
from_secret: user
|
||||
from_secret: docker_user
|
||||
password:
|
||||
from_secret: passwd
|
||||
from_secret: docker_passwd
|
||||
# password = key or actual password
|
||||
tags: dev
|
||||
|
@ -1,7 +1,7 @@
|
||||
FROM alpine:latest
|
||||
FROM golang:1.19.3-alpine
|
||||
WORKDIR /gothub
|
||||
COPY ./gothub .
|
||||
COPY ./public/ ./public/
|
||||
COPY ./views/ ./views/
|
||||
COPY . .
|
||||
RUN go mod download
|
||||
RUN go build .
|
||||
CMD ["/bin/sh", "-c", "./gothub"]
|
||||
EXPOSE 3000
|
||||
|
2
main.go
2
main.go
@ -36,7 +36,7 @@ func main() {
|
||||
|
||||
app := fiber.New(fiber.Config{
|
||||
Views: engine,
|
||||
Prefork: false,
|
||||
Prefork: true,
|
||||
AppName: "GotHub",
|
||||
ErrorHandler: func(ctx *fiber.Ctx, err error) error {
|
||||
code := fiber.StatusInternalServerError
|
||||
|
Loading…
Reference in New Issue
Block a user