mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-13 10:52:15 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a439ca70c | ||
|
|
551faca3a3 | ||
|
|
c25ffe9639 |
18
.github/stale.yml
vendored
Normal file
18
.github/stale.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Number of days of inactivity before an issue becomes stale
|
||||||
|
daysUntilStale: 60
|
||||||
|
# Number of days of inactivity before a stale issue is closed
|
||||||
|
daysUntilClose: 7
|
||||||
|
# Issues with these labels will never be considered stale
|
||||||
|
exemptLabels:
|
||||||
|
- bug
|
||||||
|
- documentation
|
||||||
|
- enhancement
|
||||||
|
# Label to use when marking an issue as stale
|
||||||
|
staleLabel: wontfix
|
||||||
|
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||||
|
markComment: >
|
||||||
|
This issue has been automatically marked as stale because it has not had
|
||||||
|
recent activity. It will be closed if no further activity occurs. Thank you
|
||||||
|
for your contributions.
|
||||||
|
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||||
|
closeComment: false
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
# Note: ARG instructions do not create additional layers.
|
# Note: ARG instructions do not create additional layers.
|
||||||
# Instead, next layers will concatenate them.
|
# Instead, next layers will concatenate them.
|
||||||
ARG GOLANG_VERSION
|
ARG GOLANG_VERSION
|
||||||
|
# Note: we have to repeat ARG instructions in each build stage that uses them.
|
||||||
ARG GOTENBERG_VERSION
|
ARG GOTENBERG_VERSION
|
||||||
|
|
||||||
FROM golang:$GOLANG_VERSION AS builder
|
FROM golang:$GOLANG_VERSION AS builder
|
||||||
@@ -18,18 +19,21 @@ RUN go mod download &&\
|
|||||||
|
|
||||||
# Copy the source code.
|
# Copy the source code.
|
||||||
COPY cmd ./cmd
|
COPY cmd ./cmd
|
||||||
COPY internal ./internal
|
|
||||||
COPY pkg ./pkg
|
COPY pkg ./pkg
|
||||||
|
|
||||||
# Build the binary.
|
# Build the binary.
|
||||||
RUN go build -o gotenberg -ldflags "-X gotenberg.version=$GOTENBERG_VERSION" cmd/gotenberg/main.go
|
ARG GOTENBERG_VERSION
|
||||||
|
|
||||||
|
RUN go build -o gotenberg -ldflags "-X 'github.com/gotenberg/gotenberg/v7/cmd.Version=$GOTENBERG_VERSION'" cmd/gotenberg/main.go
|
||||||
|
|
||||||
FROM debian:buster-slim
|
FROM debian:buster-slim
|
||||||
|
|
||||||
|
ARG GOTENBERG_VERSION
|
||||||
|
|
||||||
LABEL author="Julien Neuhart" \
|
LABEL author="Julien Neuhart" \
|
||||||
description="A Docker-powered stateless API for PDF files." \
|
description="A Docker-powered stateless API for PDF files." \
|
||||||
github="https://github.com/gotenberg/gotenberg" \
|
github="https://github.com/gotenberg/gotenberg" \
|
||||||
version="$GOTENBER_VERSION" \
|
version="$GOTENBERG_VERSION" \
|
||||||
website="https://gotenberg.dev"
|
website="https://gotenberg.dev"
|
||||||
|
|
||||||
# Improve fonts subpixel hinting and smoothing.
|
# Improve fonts subpixel hinting and smoothing.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package gotenberg
|
package gotenbergcmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -25,10 +25,13 @@ Version: %s
|
|||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
`
|
`
|
||||||
|
|
||||||
var version = "snapshot"
|
// Version is the... version of the Gotenberg application. We set it at the
|
||||||
|
// build stage of the Docker image.
|
||||||
|
var Version = "snapshot"
|
||||||
|
|
||||||
|
// Run starts the Gotenberg application. Call this in the main of your program.
|
||||||
func Run() {
|
func Run() {
|
||||||
fmt.Printf(banner, version)
|
fmt.Printf(banner, Version)
|
||||||
|
|
||||||
// Creates the roo` FlagSet and adds the modules flags to it.
|
// Creates the roo` FlagSet and adds the modules flags to it.
|
||||||
fs := flag.NewFlagSet("gotenberg", flag.ExitOnError)
|
fs := flag.NewFlagSet("gotenberg", flag.ExitOnError)
|
||||||
@@ -1,16 +1,12 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
gotenbergapp "github.com/gotenberg/gotenberg/v7/internal/app/gotenberg"
|
gotenbergcmd "github.com/gotenberg/gotenberg/v7/cmd"
|
||||||
|
|
||||||
// Gotenberg modules.
|
// Gotenberg modules.
|
||||||
_ "github.com/gotenberg/gotenberg/v7/pkg/standard"
|
_ "github.com/gotenberg/gotenberg/v7/pkg/standard"
|
||||||
// PDF engines.
|
|
||||||
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/libreoffice/pdfengine"
|
|
||||||
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/pdfcpu"
|
|
||||||
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/pdftk"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
gotenbergapp.Run()
|
gotenbergcmd.Run()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,10 @@ import (
|
|||||||
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/chromium"
|
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/chromium"
|
||||||
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/gc"
|
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/gc"
|
||||||
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/libreoffice"
|
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/libreoffice"
|
||||||
|
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/libreoffice/pdfengine"
|
||||||
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/libreoffice/unoconv"
|
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/libreoffice/unoconv"
|
||||||
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/logging"
|
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/logging"
|
||||||
|
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/pdfcpu"
|
||||||
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/pdfengines"
|
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/pdfengines"
|
||||||
|
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/pdftk"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user