Skip to content

Commit f045b0f

Browse files
committed
chore: introduce variables for base urls for similarity and export service
1 parent 3aeb28c commit f045b0f

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

compose/docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ services:
8181
- "${EXPORT_SERVICE_PORT}:8080"
8282
environment:
8383
MB_DATA_DIRECTORY: "/MassBank-data"
84-
CORS_ALLOWED_ORIGINS: "http://${MB3_FRONTEND_HOST}:${MB3_FRONTEND_PORT}"
84+
CORS_ALLOWED_ORIGINS: ${MB3_FRONTEND_URL}"
8585
volumes:
8686
- "${EXPORT_MB_DATA_DIRECTORY}:/MassBank-data"
8787

@@ -95,7 +95,7 @@ services:
9595
MB3_FRONTEND_URL: "http://${MB3_FRONTEND_HOST}:${MB3_FRONTEND_PORT}"
9696
MB3_FRONTEND_BASE_URL: "${MB3_FRONTEND_BASE_URL}"
9797
MB3_FRONTEND_VERSION: "${MB3_FRONTEND_VERSION}"
98-
EXPORT_SERVICE_URL: "http://${EXPORT_SERVICE_HOST}:${EXPORT_SERVICE_PORT}"
98+
EXPORT_SERVICE_URL: "${EXPORT_SERVICE_URL}"
9999
EXPORT_SERVICE_URL_INTERNAL: "http://${EXPORT_SERVICE_HOST_INTERNAL}:${EXPORT_SERVICE_PORT_INTERNAL}"
100100
GOOGLE_SEARCH_CONSOLE_KEY: "${GOOGLE_SEARCH_CONSOLE_KEY}"
101101
DISTRIBUTOR_TEXT: "${DISTRIBUTOR_TEXT}"

compose/env.dist

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,13 @@ MB3_SERVER_HOST=mb3server
4949

5050
# The port where the similarity service is exposed
5151
SIMILARITY_SERVICE_PORT=8082
52+
5253
# The host name of similarity service
5354
SIMILARITY_SERVICE_HOST=localhost
5455

56+
# The base URL for the similarity service
57+
SIMILARITY_SERVICE_BASE_URL=""
58+
5559
# The path to the volume to store, e.g. "/massbank-volume"
5660
MSP_LOCAL_PATH=./../data/massbank-volume
5761

@@ -71,8 +75,11 @@ EXPORT_SERVICE_PORT=8083
7175
# The hostname of the export-service
7276
EXPORT_SERVICE_HOST=localhost
7377

78+
# The base URL for the export service
79+
EXPORT_SERVICE_BASE_URL=""
80+
7481
# The MassBank-data repository path
75-
EXPORT_MB_DATA_DIRECTORY=./../data/MassBank-data
82+
EXPORT_MB_DATA_DIRECTORY=./../data/massbank-data
7683

7784
# The port used internally by the export-service
7885
EXPORT_SERVICE_PORT_INTERNAL=8080
@@ -152,5 +159,8 @@ DISTRIBUTOR_URL=""
152159
# API server (from external)
153160
# ---------------------------
154161

155-
# The URL of the API server (from external)
156-
MB3_API_URL=http://${MB3_API_HOST}:${MB3_API_PORT}${MB3_API_BASE_URL}
162+
# The different final URLs (from external)
163+
MB3_API_URL=http://${MB3_API_HOST}:${MB3_API_PORT}${MB3_API_BASE_URL}
164+
MB3_FRONTEND_URL=http://${MB3_FRONTEND_HOST}:${MB3_FRONTEND_PORT}${MB3_FRONTEND_BASE_URL}
165+
SIMILARITY_SERVICE_URL=http://${SIMILARITY_SERVICE_HOST}:${SIMILARITY_SERVICE_PORT}${SIMILARITY_SERVICE_BASE_URL}
166+
EXPORT_SERVICE_URL=http://${EXPORT_SERVICE_HOST}:${EXPORT_SERVICE_PORT}${EXPORT_SERVICE_BASE_URL}

0 commit comments

Comments
 (0)