Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-cn-database-generator
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
MyCard
ygopro-cn-database-generator
Commits
c5806a98
Commit
c5806a98
authored
Oct 08, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use env for configuration
parent
3159b2b6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
.dockerignore
.dockerignore
+1
-0
Dockerfile
Dockerfile
+1
-1
src/config.ts
src/config.ts
+7
-1
No files found.
.dockerignore
View file @
c5806a98
...
...
@@ -105,6 +105,7 @@ dist
/build
/output
/test
.git*
.dockerignore
...
...
Dockerfile
View file @
c5806a98
FROM
node:buster-slim
RUN
apt update
&&
apt
-y
install
python3 build-essential
&&
rm
-rf
/var/lib/apt/lists/
*
/tmp/
*
/var/tmp/
*
RUN
apt update
&&
apt
-y
install
python3 build-essential
sqlite3
&&
rm
-rf
/var/lib/apt/lists/
*
/tmp/
*
/var/tmp/
*
WORKDIR
/usr/src/app
COPY
./package*.json ./
RUN
npm ci
...
...
src/config.ts
View file @
c5806a98
...
...
@@ -9,5 +9,11 @@ export interface Config {
}
export
async
function
loadConfig
():
Promise
<
Config
>
{
return
yaml
.
parse
(
await
fs
.
promises
.
readFile
(
"
./config.yaml
"
,
"
utf-8
"
));
// return yaml.parse(await fs.promises.readFile("./config.yaml", "utf-8"));
return
{
postDepth
:
process
.
env
.
POST_DEPTH
?
parseInt
(
process
.
env
.
POST_DEPTH
)
:
5
,
jpDatabasePath
:
process
.
env
.
JP_DATABASE_PATH
||
"
./ygopro-database/locales/ja-JP/cards.cdb
"
,
cnDatabasePath
:
process
.
env
.
CN_DATABASE_PATH
||
"
./ygopro-database/locales/zh-CN/cards.cdb
"
,
outputPath
:
process
.
env
.
OUTPUT_PATH
||
"
./output
"
}
}
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