Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
cxcy-scoresheet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MathWeb
cxcy-scoresheet
Commits
903a8f04
Commit
903a8f04
authored
May 13, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable sandbox
parent
db064205
Pipeline
#3254
failed with stages
in 47 minutes and 46 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
Dockerfile
Dockerfile
+4
-9
src/app.service.ts
src/app.service.ts
+8
-1
No files found.
Dockerfile
View file @
903a8f04
...
...
@@ -8,17 +8,12 @@ RUN apt-get update \
&&
apt-get update
\
&&
apt-get
install
-y
python3 build-essential google-chrome-stable fonts-ipafont-gothic fonts-wqy-microhei fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1
\
--no-install-recommends
\
&&
rm
-rf
/tmp/
*
/var/tmp/
*
/var/lib/apt/lists/
*
\
&&
groupadd
-r
mathweb
&&
useradd
-r
-g
mathweb
-G
audio,video mathweb
\
&&
mkdir
-p
/home/mathweb/Downloads /home/mathweb/app
\
&&
chown
-R
mathweb:mathweb /home/mathweb
&&
rm
-rf
/tmp/
*
/var/tmp/
*
/var/lib/apt/lists/
*
USER
mathweb
WORKDIR
/home/mathweb/app
COPY
--chown=mathweb:mathweb ./package*.json ./
WORKDIR
/usr/src/app
COPY
./package*.json ./
RUN
npm ci
COPY
--chown=mathweb:mathweb
. ./
COPY
. ./
RUN
npm run build
CMD
["npm", "run", "start:prod"]
src/app.service.ts
View file @
903a8f04
...
...
@@ -66,7 +66,14 @@ export class AppService {
const
renderedMarkdownContent
=
mustache
.
render
(
this
.
template
,
data
,
null
,
{
escape
:
(
v
)
=>
v
,
});
const
{
content
}
=
await
mdToPdf
({
content
:
renderedMarkdownContent
});
const
{
content
}
=
await
mdToPdf
(
{
content
:
renderedMarkdownContent
},
{
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
launch_options
:
{
args
:
[
'
--no-sandbox
'
,
'
--disable-setuid-sandbox
'
]
},
},
);
return
content
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment