mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-08 16:42:15 +01:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a439ca70c |
@@ -19,13 +19,12 @@ RUN go mod download &&\
|
||||
|
||||
# Copy the source code.
|
||||
COPY cmd ./cmd
|
||||
COPY internal ./internal
|
||||
COPY pkg ./pkg
|
||||
|
||||
# Build the binary.
|
||||
ARG GOTENBERG_VERSION
|
||||
|
||||
RUN go build -o gotenberg -ldflags "-X 'github.com/gotenberg/gotenberg/v7/internal/app/gotenberg.version=$GOTENBERG_VERSION'" cmd/gotenberg/main.go
|
||||
RUN go build -o gotenberg -ldflags "-X 'github.com/gotenberg/gotenberg/v7/cmd.Version=$GOTENBERG_VERSION'" cmd/gotenberg/main.go
|
||||
|
||||
FROM debian:buster-slim
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package gotenberg
|
||||
package gotenbergcmd
|
||||
|
||||
import (
|
||||
"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() {
|
||||
fmt.Printf(banner, version)
|
||||
fmt.Printf(banner, Version)
|
||||
|
||||
// Creates the roo` FlagSet and adds the modules flags to it.
|
||||
fs := flag.NewFlagSet("gotenberg", flag.ExitOnError)
|
||||
@@ -1,16 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
gotenbergapp "github.com/gotenberg/gotenberg/v7/internal/app/gotenberg"
|
||||
gotenbergcmd "github.com/gotenberg/gotenberg/v7/cmd"
|
||||
|
||||
// Gotenberg modules.
|
||||
_ "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() {
|
||||
gotenbergapp.Run()
|
||||
gotenbergcmd.Run()
|
||||
}
|
||||
|
||||
@@ -5,7 +5,10 @@ import (
|
||||
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/chromium"
|
||||
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/gc"
|
||||
_ "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/logging"
|
||||
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/pdfcpu"
|
||||
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/pdfengines"
|
||||
_ "github.com/gotenberg/gotenberg/v7/pkg/modules/pdftk"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user