Skip to content

Commit

Permalink
[DOC] Added warning about quoting in .env file for Docker commands (#…
Browse files Browse the repository at this point in the history
…284)

* added Warning

* Added issue reference

Co-authored-by: Alyssa Dai <[email protected]>

---------

Co-authored-by: Alyssa Dai <[email protected]>
  • Loading branch information
samadpls and alyssadai authored Mar 7, 2024
1 parent b1eb9e2 commit 4ade1eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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`:
Expand Down

0 comments on commit 4ade1eb

Please sign in to comment.