Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
callidus
Machina Callida
Commits
d0e48807
Commit
d0e48807
authored
May 18, 2020
by
Konstantin Schulz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed host IP problems for the docker compose service 'mcserver'
parent
402ffe3c
Pipeline
#11597
failed with stages
in 23 minutes and 6 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
mc_backend/README.md
mc_backend/README.md
+0
-2
mc_backend/mcserver/app/__init__.py
mc_backend/mcserver/app/__init__.py
+1
-1
mc_backend/mcserver/app/services/databaseService.py
mc_backend/mcserver/app/services/databaseService.py
+1
-1
mc_backend/mcserver/config.py
mc_backend/mcserver/config.py
+4
-2
No files found.
mc_backend/README.md
View file @
d0e48807
...
...
@@ -16,8 +16,6 @@ DATABASE_URL_PROD=postgresql://postgres@db:5432/
DATABASE_URL=postgresql://postgres@db:5432/
# Change this to "production" for public use
FLASK_ENV_VARIABLE=development
# for Windows, use 127.0.0.1 instead
HOST_IP=0.0.0.0
RUST_BACKTRACE=1
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
```
...
...
mc_backend/mcserver/app/__init__.py
View file @
d0e48807
...
...
@@ -88,10 +88,10 @@ def init_app_common(cfg: Type[Config] = Config, is_csm: bool = False) -> Flask:
app
.
app_context
().
push
()
db
.
init_app
(
app
)
migrate
.
init_app
(
app
,
db
)
db
.
create_all
()
if
is_csm
:
from
mcserver.app.services.databaseService
import
DatabaseService
DatabaseService
.
init_db_alembic
()
db
.
create_all
()
from
mcserver.app.services.textService
import
TextService
TextService
.
init_proper_nouns_list
()
TextService
.
init_stop_words_latin
()
...
...
mc_backend/mcserver/app/services/databaseService.py
View file @
d0e48807
...
...
@@ -11,7 +11,7 @@ from mcserver.app.models import CitationLevel, ResourceType, TextComplexityMeasu
AnnisResponse
,
GraphData
,
TextComplexity
from
mcserver.app.services
import
CorpusService
,
CustomCorpusService
,
TextComplexityService
from
mcserver.config
import
Config
from
mcserver.models_auto
import
Corpus
,
Exercise
,
TExercise
,
UpdateInfo
from
mcserver.models_auto
import
Corpus
,
Exercise
,
UpdateInfo
class
DatabaseService
:
...
...
mc_backend/mcserver/config.py
View file @
d0e48807
...
...
@@ -81,8 +81,10 @@ class Config(object):
H5P_FILL_BLANKS
=
"fill_blanks"
H5P_MULTI_CHOICE
=
"multi_choice"
H5P_VOC_LIST
=
"voc_list"
HOST_IP_MCSERVER
=
os
.
environ
.
get
(
"HOST_IP"
,
DOCKER_SERVICE_NAME_MCSERVER
if
IS_DOCKER
else
"127.0.0.1"
)
HOST_IP_CSM
=
DOCKER_SERVICE_NAME_CSM
if
IS_DOCKER
else
HOST_IP_MCSERVER
# Windows: use 127.0.0.1 as host IP fallback
HOST_IP_FALLBACK
=
"0.0.0.0"
HOST_IP_CSM
=
DOCKER_SERVICE_NAME_CSM
if
IS_DOCKER
else
HOST_IP_FALLBACK
HOST_IP_MCSERVER
=
DOCKER_SERVICE_NAME_MCSERVER
if
IS_DOCKER
else
HOST_IP_FALLBACK
HOST_PORT
=
5000
INTERNET_PROTOCOL
=
"http://"
INTERVAL_CORPUS_AGE_CHECK
=
60
*
60
...
...
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