From 4ade1eb51a7f049fa4a57d1d7e36732b9ec94328 Mon Sep 17 00:00:00 2001 From: Abdul Samad Siddiqui Date: Fri, 8 Mar 2024 00:31:51 +0500 Subject: [PATCH] [DOC] Added warning about quoting in `.env` file for Docker commands (#284) * added Warning * Added issue reference Co-authored-by: Alyssa Dai --------- Co-authored-by: Alyssa Dai --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8539fa8..6239e01 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,7 @@ If you wish to set different port numbers, modify your `.env` file accordingly a export $(cat .env | xargs) # export your .env file to expose your set port numbers to the -p flag of docker run docker run -d --name=api -p ${NB_API_PORT_HOST}:${NB_API_PORT} --env-file=.env neurobagel/api ``` +> :warning: **IMPORTANT:** If using the above command, do not wrap any values for variables in the `.env` file in quotation marks, as they will be interpreted literally and may lead to [issues](https://github.com/docker/for-linux/issues/1208). #### Option 3: Build the image using the Dockerfile After cloning the current repository, build the Docker image locally: @@ -120,6 +121,7 @@ docker build -t neurobagel/api . export $(cat .env | xargs) # export your .env file to expose your set port numbers to the -p flag of docker run docker run -d --name=api -p ${NB_API_PORT_HOST}:${NB_API_PORT} --env-file=.env neurobagel/api ``` +> :warning: **IMPORTANT:** If using the above command, do not wrap any values for variables in the `.env` file in quotation marks, as they will be interpreted literally and may lead to [issues](https://github.com/docker/for-linux/issues/1208). #### Send a test query to the API By default, after running the above steps, the API should be served at localhost, http://127.0.0.1:8000/query, on the machine where you launched the Dockerized app. To check that the API is running and can access the knowledge graph as expected, you can navigate to the interactive API docs in your local browser (http://127.0.0.1:8000/docs) and enter a sample query, or send an HTTP request in your terminal using `curl`: