Skip to content

Commit

Permalink
add: user guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiru committed Nov 17, 2023
1 parent cf53a99 commit 6eee081
Show file tree
Hide file tree
Showing 25 changed files with 155 additions and 1,097 deletions.
5 changes: 0 additions & 5 deletions Back-end/Dockerfile

This file was deleted.

15 changes: 3 additions & 12 deletions Back-end/Readme.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
### **City of Portland**
### **City of Portland: Designing an Open Contracting Program Back-end**

#### **Docker Usage for backend**:
1. Execute the Dockerfile to build the image:
```
docker build -t cop_backend .
```
2. Execute the script to run the image:
```
sh docker_run.sh
# Note: need to change the absolute path of your Cop directory
```
3. Once inside the container, initiate the backend service.

Once inside the container, initiate the backend service.
```
python3 app.py
```
Expand Down
5 changes: 3 additions & 2 deletions Back-end/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
app = Flask(__name__)
CORS(app)

uri = "mongodb+srv://cop:" + urllib.parse.quote("Cityofportland@123") + "@cop.9izbbfh.mongodb.net/?retryWrites=true&w=majority"
cluster = MongoClient(uri)
# uri = "mongodb+srv://cop:" + urllib.parse.quote("Cityofportland@123") + "@cop.9izbbfh.mongodb.net/?retryWrites=true&w=majority"
# cluster = MongoClient(uri)
cluster = MongoClient('localhost', 27017)
db = cluster["COP"]
mycol_general = db["General"]
mycol_award = db["Award"]
Expand Down
7 changes: 0 additions & 7 deletions Back-end/docker_run.sh

This file was deleted.

Loading

0 comments on commit 6eee081

Please sign in to comment.