Add Woodpecker CI for Docker images and set default port in Dockerfile

This commit is contained in:
VnPower
2024-04-17 20:03:23 +07:00
parent f2e7a47331
commit 154d8403cb
3 changed files with 14 additions and 1 deletions
+10
View File
@@ -0,0 +1,10 @@
steps:
- name: docker
image: docker
commands:
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- export VERSION=$(cat core/config/config.go | grep "v[0-9]\+\.[0-9]\+" -o)
- docker image build -t "vnpower/pixivfe:$VERSION" .
- docker image push "vnpower/pixivfe:$VERSION"
secrets: [ DOCKER_USERNAME, DOCKER_PASSWORD ]
+3
View File
@@ -2,6 +2,9 @@
FROM golang:1.22 as builder
WORKDIR /app
# 8282 is the default port for Docker
ENV PIXIVFE_PORT=8282
COPY go.* ./
RUN go mod download
COPY . ./
+1 -1
View File
@@ -69,7 +69,7 @@ var EnvList []*EnvVar = []*EnvVar{
// **Required**: No
//
// Set this to a number to enable the built-in rate limiter. For example `PIXIVFE_REQUESTLIMIT=15`.
//
//
// It might be better to enable rate limiting in the reverse proxy in front of PixivFE rather than using this.
},
{