Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dtu-enote-getpdf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
enote
dtu-enote-getpdf
Commits
b7fa952b
Commit
b7fa952b
authored
7 years ago
by
Iain Bryson
Browse files
Options
Downloads
Patches
Plain Diff
Add missing file from merge.
parent
d0cfcb4a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
getpdf-server/src/config.js
+42
-0
42 additions, 0 deletions
getpdf-server/src/config.js
with
42 additions
and
0 deletions
getpdf-server/src/config.js
0 → 100644
+
42
−
0
View file @
b7fa952b
import
yaml
from
"
js-yaml
"
;
import
path
from
'
path
'
;
import
fs
from
'
fs
'
;
const
urls_by_env
=
{
development
:
{
sharelatex_db
:
"
mongodb://sharelatex-db.docker.local:27018/sharelatex
"
,
getpdf_db
:
"
mongodb://sharelatex-db.docker.local:27018/getpdf
"
,
getpdf_agenda_db
:
"
mongodb://sharelatex-db.docker.local:27018/getpdf_agenda
"
},
production
:
{
sharelatex_db
:
"
mongodb://sharelatex-db/sharelatex
"
,
getpdf_db
:
"
mongodb://sharelatex-db/getpdf
"
,
getpdf_agenda_db
:
"
mongodb://sharelatex-db/getpdf_agenda
"
}
}
const
sharelatex_data_path_by_env
=
{
development
:
"
/Users/iainbryson/Projects/DTUQuiz/enote-devel/vol/sharelatex-data/
"
,
production
:
"
/var/lib/sharelatex
"
,
}
const
env
=
process
.
env
.
NODE_ENV
||
'
development
'
;
const
vol_root
=
process
.
env
.
DTU_ENOTE_VOL
||
"
/data
"
;
const
config_root
=
path
.
join
(
vol_root
,
"
config
"
);
const
sharelatex_config_file
=
fs
.
readFileSync
(
path
.
join
(
config_root
,
"
sharelatex.yaml
"
),
{
encoding
:
'
utf8
'
});
console
.
log
(
sharelatex_config_file
)
const
sharelatex_config
=
yaml
.
safeLoad
(
sharelatex_config_file
);
console
.
dir
(
sharelatex_config
);
console
.
log
(
`Configuring environment for
${
process
.
env
.
NODE_ENV
}
${
env
}
`
);
export
default
{
env
:
env
,
db_urls
:
urls_by_env
[
env
],
sharelatex_data_path
:
sharelatex_data_path_by_env
[
env
],
vol_root
:
vol_root
,
config_root
:
config_root
,
sharelatex_config
:
sharelatex_config
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment