feat: Adds pdf support to docker images.
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -11,3 +11,5 @@ node_modules/
|
|||||||
tailwindcss
|
tailwindcss
|
||||||
.envrc
|
.envrc
|
||||||
*.pdf
|
*.pdf
|
||||||
|
.env
|
||||||
|
.env*
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public struct EnvVars: Codable, Equatable, Sendable {
|
|||||||
public let pdfEngine: String
|
public let pdfEngine: String
|
||||||
|
|
||||||
public init(
|
public init(
|
||||||
pandocPath: String = "/bin/pandoc",
|
pandocPath: String = "/usr/bin/pandoc",
|
||||||
pdfEngine: String = "weasyprint"
|
pdfEngine: String = "weasyprint"
|
||||||
) {
|
) {
|
||||||
self.pandocPath = pandocPath
|
self.pandocPath = pandocPath
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ extension ViewController.Request {
|
|||||||
// // TestPage(trunks: result.trunks, rooms: result.rooms)
|
// // TestPage(trunks: result.trunks, rooms: result.rooms)
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
return try! await pdfClient.html(.mock())
|
// return try! await pdfClient.html(.mock())
|
||||||
|
return EmptyHTML()
|
||||||
case .login(let route):
|
case .login(let route):
|
||||||
switch route {
|
switch route {
|
||||||
case .index(let next):
|
case .index(let next):
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
|
|||||||
# libxml2 \
|
# libxml2 \
|
||||||
sqlite3 \
|
sqlite3 \
|
||||||
curl \
|
curl \
|
||||||
|
pandoc \
|
||||||
|
weasyprint \
|
||||||
&& rm -r /var/lib/apt/lists/*
|
&& rm -r /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Create a vapor user and group with /app as its home directory
|
# Create a vapor user and group with /app as its home directory
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
|
|||||||
build-essential \
|
build-essential \
|
||||||
curl \
|
curl \
|
||||||
wkhtmltopdf \
|
wkhtmltopdf \
|
||||||
|
pandoc \
|
||||||
|
weasyprint \
|
||||||
&& rm -r /var/lib/apt/lists/*
|
&& rm -r /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Set up a build area
|
# Set up a build area
|
||||||
|
|||||||
Reference in New Issue
Block a user