Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
NACSOS Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
Model experiments
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
MCC APSIS
NACSOS
NACSOS Core
Commits
e1d460f9
Commit
e1d460f9
authored
2 years ago
by
Tim Repke
Browse files
Options
Downloads
Patches
Plain Diff
make root path configurable
parent
d34a204c
No related branches found
Branches containing commit
No related tags found
1 merge request
!16
make root path configurable
Pipeline
#1020
canceled
2 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
server/__init__.py
+3
-1
3 additions, 1 deletion
server/__init__.py
server/util/config.py
+2
-0
2 additions, 0 deletions
server/util/config.py
with
5 additions
and
1 deletion
server/__init__.py
+
3
−
1
View file @
e1d460f9
...
@@ -17,7 +17,9 @@ mimetypes.init()
...
@@ -17,7 +17,9 @@ mimetypes.init()
logger
=
get_logger
(
'
nacsos.server
'
)
logger
=
get_logger
(
'
nacsos.server
'
)
app
=
FastAPI
(
openapi_url
=
settings
.
SERVER
.
OPENAPI_FILE
)
app
=
FastAPI
(
openapi_url
=
settings
.
SERVER
.
OPENAPI_FILE
,
openapi_prefix
=
settings
.
SERVER
.
OPENAPI_PREFIX
,
root_path
=
settings
.
SERVER
.
ROOT_PATH
)
logger
.
debug
(
'
Setting up server and middlewares
'
)
logger
.
debug
(
'
Setting up server and middlewares
'
)
mimetypes
.
add_type
(
'
application/javascript
'
,
'
.js
'
)
mimetypes
.
add_type
(
'
application/javascript
'
,
'
.js
'
)
...
...
This diff is collapsed.
Click to expand it.
server/util/config.py
+
2
−
0
View file @
e1d460f9
...
@@ -21,6 +21,8 @@ class ServerConfig(BaseModel):
...
@@ -21,6 +21,8 @@ class ServerConfig(BaseModel):
WORKERS
:
int
=
2
# number of worker processes
WORKERS
:
int
=
2
# number of worker processes
STATIC_FILES
:
str
=
'
../nacsos-web/dist/
'
# path to the static files to be served
STATIC_FILES
:
str
=
'
../nacsos-web/dist/
'
# path to the static files to be served
OPENAPI_FILE
:
str
=
'
/openapi.json
'
# absolute URL path to openapi.json file
OPENAPI_FILE
:
str
=
'
/openapi.json
'
# absolute URL path to openapi.json file
OPENAPI_PREFIX
:
str
=
''
# see https://fastapi.tiangolo.com/advanced/behind-a-proxy/
ROOT_PATH
:
str
=
''
# see https://fastapi.tiangolo.com/advanced/behind-a-proxy/
HASH_ALGORITHM
:
str
=
'
HS256
'
HASH_ALGORITHM
:
str
=
'
HS256
'
SECRET_KEY
:
str
=
secrets
.
token_urlsafe
(
32
)
SECRET_KEY
:
str
=
secrets
.
token_urlsafe
(
32
)
...
...
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