mirror of
https://codeberg.org/VnPower/PixivFE
synced 2024-12-06 19:16:23 +01:00
Add docker
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
FROM docker.io/golang:1.21 as builder
|
||||
WORKDIR /app
|
||||
COPY go.* ./
|
||||
RUN go mod download
|
||||
COPY . ./
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -mod=readonly -v -o pixivfe
|
||||
|
||||
FROM docker.io/alpine:3
|
||||
COPY --from=builder /app/pixivfe /pixivfe
|
||||
COPY --from=builder /app/views /views
|
||||
EXPOSE 8282
|
||||
|
||||
ENTRYPOINT ["/pixivfe"]
|
||||
@@ -0,0 +1,23 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
pixivfe:
|
||||
container_name: pixivfe
|
||||
hostname: pixivfe
|
||||
restart: always
|
||||
user: 65534:65534
|
||||
read_only: true
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
cap_drop:
|
||||
- ALL
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "8282:8282"
|
||||
environment:
|
||||
# Visit https://codeberg.org/VnPower/PixivFE/wiki/Environment-variables for more details
|
||||
- PIXIVFE_TOKEN=changethis
|
||||
- PIXIVFE_PORT=8282
|
||||
- PIXIVFE_IMAGEPROXY=pximg.cocomi.cf
|
||||
Reference in New Issue
Block a user