Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl-help-and-docs
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-web
ensembl-help-and-docs
Commits
d9cf398b
Commit
d9cf398b
authored
3 years ago
by
Andrey Azov
Browse files
Options
Downloads
Patches
Plain Diff
Use PUBLIC_PATH environment variable when building urls to images
parent
e8043a39
No related branches found
No related tags found
No related merge requests found
Pipeline
#182179
passed with stages
in 1 minute and 31 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+1
-0
1 addition, 0 deletions
.gitlab-ci.yml
config.ts
+2
-1
2 additions, 1 deletion
config.ts
with
3 additions
and
1 deletion
.gitlab-ci.yml
+
1
−
0
View file @
d9cf398b
...
...
@@ -5,6 +5,7 @@ stages:
variables
:
DOCKER_IMAGE
:
${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}
DOCKER_TLS_CERTDIR
:
"
"
PUBLIC_PATH
:
/api/docs
.build
:
stage
:
build
...
...
This diff is collapsed.
Click to expand it.
config.ts
+
2
−
1
View file @
d9cf398b
...
...
@@ -3,6 +3,7 @@ import path from 'path';
const
host
=
process
.
env
.
HOST
||
'
http://127.0.0.1:3000
'
;
const
isProduction
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
isBuildingDocs
=
process
.
env
.
NODE_ENV
===
'
build-docs
'
;
const
publicPath
=
process
.
env
.
PUBLIC_PATH
||
'
/api
'
;
const
docsPath
=
path
.
resolve
(
__dirname
,
'
docs
'
);
const
buildPath
=
isProduction
...
...
@@ -23,7 +24,7 @@ export default {
docsPath
,
articlesPath
:
path
.
join
(
docsPath
,
'
article
'
),
videosPath
:
path
.
join
(
docsPath
,
'
video
'
),
publicPath
:
isProduction
?
'
/api/docs
'
:
'
/api
'
,
// FIXME: we'll need to rely on the environment variable other than NODE_ENV for this
publicPath
,
indexDirectory
,
articlesIndexName
,
articlesIndexPath
:
path
.
join
(
indexDirectory
,
articlesIndexName
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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