Skip to content

Commit 4708085

Browse files
authored
♻️ Maintenance: updates env-vars in api-server ⚠️ (#5083)
1 parent 36b1837 commit 4708085

File tree

4 files changed

+53
-23
lines changed

4 files changed

+53
-23
lines changed

.env-devel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ WEBSERVER_ANNOUNCEMENTS=1
166166
WEBSERVER_DEV_FEATURES_ENABLED=0
167167

168168
WEBSERVER_HOST=webserver
169+
WEBSERVER_PORT=8080
169170

170171
WEBSERVER_CATALOG={}
171172
CATALOG_HOST=catalog

.vscode/extensions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"charliermarsh.ruff",
55
"eamodio.gitlens",
66
"exiasr.hadolint",
7+
"hediet.vscode-drawio",
78
"ms-azuretools.vscode-docker",
89
"ms-python.black-formatter",
910
"ms-python.pylint",

services/api-server/setup.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def read_reqs(reqs_path: Path) -> set[str]:
2222

2323
NAME = "simcore-service-api-server"
2424
VERSION = (CURRENT_DIR / "VERSION").read_text().strip()
25-
AUTHORS = "Pedro Crespo-Valero (pcrespov)"
25+
AUTHORS = ("Pedro Crespo-Valero (pcrespov)", "Mads Bisgaard (bisgaard-itis)")
2626
DESCRIPTION = "Platform's API Server for external clients"
2727
README = (CURRENT_DIR / "README.md").read_text()
2828

@@ -39,30 +39,30 @@ def read_reqs(reqs_path: Path) -> set[str]:
3939

4040
TEST_REQUIREMENTS = tuple(read_reqs(CURRENT_DIR / "requirements" / "_test.txt"))
4141

42-
SETUP = dict(
43-
name=NAME,
44-
version=VERSION,
45-
author=AUTHORS,
46-
description=DESCRIPTION,
47-
long_description=README,
48-
license="MIT license",
49-
python_requires="~=3.10",
50-
packages=find_packages(where="src"),
51-
package_dir={
42+
SETUP = {
43+
"name": NAME,
44+
"version": VERSION,
45+
"author": AUTHORS,
46+
"description": DESCRIPTION,
47+
"long_description": README,
48+
"license": "MIT license",
49+
"python_requires": "~=3.10",
50+
"packages": find_packages(where="src"),
51+
"package_dir": {
5252
"": "src",
5353
},
54-
include_package_data=True,
55-
install_requires=PROD_REQUIREMENTS,
56-
test_suite="tests",
57-
tests_require=TEST_REQUIREMENTS,
58-
extras_require={"test": TEST_REQUIREMENTS},
59-
entry_points={
54+
"include_package_data": True,
55+
"install_requires": PROD_REQUIREMENTS,
56+
"test_suite": "tests",
57+
"tests_require": TEST_REQUIREMENTS,
58+
"extras_require": {"test": TEST_REQUIREMENTS},
59+
"entry_points": {
6060
"console_scripts": [
6161
"simcore-service-api-server = simcore_service_api_server.cli:main",
6262
"simcore-service = simcore_service_api_server.cli:main",
6363
],
6464
},
65-
)
65+
}
6666

6767
if __name__ == "__main__":
6868
setup(**SETUP)

services/docker-compose.yml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,36 @@ services:
55
init: true
66
hostname: "{{.Node.Hostname}}-{{.Service.Name}}-{{.Task.Slot}}"
77
environment:
8-
- WEBSERVER_HOST=${WEBSERVER_HOST:-webserver}
9-
- LOG_LEVEL=${LOG_LEVEL:-WARNING}
10-
- LOG_FORMAT_LOCAL_DEV_ENABLED=${LOG_FORMAT_LOCAL_DEV_ENABLED}
11-
env_file:
12-
- ../.env
8+
- API_SERVER_DEV_FEATURES_ENABLED=${API_SERVER_DEV_FEATURES_ENABLED}
9+
- API_SERVER_LOG_FORMAT_LOCAL_DEV_ENABLED=${LOG_FORMAT_LOCAL_DEV_ENABLED}
10+
11+
- CATALOG_HOST=${CATALOG_HOST}
12+
- CATALOG_PORT=${CATALOG_PORT}
13+
14+
- DIRECTOR_V2_HOST=${DIRECTOR_V2_HOST}
15+
- DIRECTOR_V2_PORT=${DIRECTOR_V2_PORT}
16+
17+
- API_SERVER_LOGLEVEL=${API_SERVER_LOGLEVEL:-${LOG_LEVEL:-WARNING}}
18+
19+
- POSTGRES_DB=${POSTGRES_DB}
20+
- POSTGRES_HOST=${POSTGRES_HOST}
21+
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
22+
- POSTGRES_PORT=${POSTGRES_PORT}
23+
- POSTGRES_USER=${POSTGRES_USER}
24+
25+
- RABBIT_HOST=${RABBIT_HOST}
26+
- RABBIT_PASSWORD=${RABBIT_PASSWORD}
27+
- RABBIT_PORT=${RABBIT_PORT}
28+
- RABBIT_SECURE=${RABBIT_SECURE}
29+
- RABBIT_USER=${RABBIT_USER}
30+
31+
- STORAGE_HOST=${STORAGE_HOST}
32+
- STORAGE_PORT=${STORAGE_PORT}
33+
34+
- WEBSERVER_HOST=${WEBSERVER_HOST}
35+
- WEBSERVER_PORT=${WEBSERVER_PORT}
36+
- WEBSERVER_SESSION_SECRET_KEY=${WEBSERVER_SESSION_SECRET_KEY}
37+
1338
deploy:
1439
labels:
1540
- io.simcore.zone=${TRAEFIK_SIMCORE_ZONE}
@@ -433,6 +458,7 @@ services:
433458
# WEBSERVER_SERVER_HOST
434459

435460
WEBSERVER_HOST: ${WEBSERVER_HOST}
461+
WEBSERVER_PORT: ${WEBSERVER_PORT}
436462

437463
# WEBSERVER_SERVER_PORT
438464

@@ -619,6 +645,7 @@ services:
619645
WEBSERVER_LOGLEVEL: ${WB_DB_EL_LOGLEVEL}
620646

621647
WEBSERVER_HOST: ${WEBSERVER_HOST}
648+
WEBSERVER_PORT: ${WEBSERVER_PORT}
622649

623650
# WEBSERVER_DB
624651
POSTGRES_DB: ${POSTGRES_DB}
@@ -702,6 +729,7 @@ services:
702729
WEBSERVER_LOGLEVEL: ${WB_GC_LOGLEVEL}
703730

704731
WEBSERVER_HOST: ${WEBSERVER_HOST}
732+
WEBSERVER_PORT: ${WEBSERVER_PORT}
705733

706734
# WEBSERVER_RESOURCE_USAGE_TRACKER
707735
RESOURCE_USAGE_TRACKER_HOST: ${RESOURCE_USAGE_TRACKER_HOST}

0 commit comments

Comments
 (0)