Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
easybistro-api-docker
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sasit Wiratjinda
easybistro-api-docker
Commits
fcd31ef1
Commit
fcd31ef1
authored
Nov 23, 2022
by
Ai-Sasit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update mongo-url
parent
d7e1d64d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
Dockerfile
Dockerfile
+1
-1
docker-compose.yml
docker-compose.yml
+3
-1
database.py
server/service/database.py
+1
-1
No files found.
Dockerfile
View file @
fcd31ef1
...
...
@@ -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", "
8
0"]
CMD
["uvicorn", "server.core:app", "--host", "0.0.0.0", "--port", "
900
0"]
docker-compose.yml
View file @
fcd31ef1
...
...
@@ -5,7 +5,7 @@ services:
container_name
:
easybistro-api
build
:
.
ports
:
-
"
80:8
0"
-
"
9000:900
0"
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
server/service/database.py
View file @
fcd31ef1
...
...
@@ -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
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment