Commit fcd31ef1 authored by Ai-Sasit's avatar Ai-Sasit

update mongo-url

parent d7e1d64d
......@@ -14,4 +14,4 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY ./server /code/server
#
CMD ["uvicorn", "server.core:app", "--host", "0.0.0.0", "--port", "80"]
CMD ["uvicorn", "server.core:app", "--host", "0.0.0.0", "--port", "9000"]
......@@ -5,7 +5,7 @@ services:
container_name: easybistro-api
build: .
ports:
- "80:80"
- "9000:9000"
depends_on:
- mongodb
......@@ -21,6 +21,7 @@ services:
mongo-express:
image: mongo-express:latest
container_name: mongo-monitor
restart: always
ports:
- 8081:8081
environment:
......@@ -29,4 +30,5 @@ services:
ME_CONFIG_MONGODB_SERVER: database
depends_on:
- mongodb
- web
......@@ -2,7 +2,7 @@ import pymongo
def get_connection(collection:str):
client = pymongo.MongoClient('mongodb://easybistro:xejP3257@localhost:27017/Easybistro')
client = pymongo.MongoClient('mongodb://easybistro:xejP3257@database/Easybistro?authSource=admin&retryWrites=true&w=majority')
return client['easybistro'][collection]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment