Skip to content

Commit d68f35b

Browse files
committed
Changes to be committed:
modified: docs/deployment/localDeployment.md
1 parent e4f8210 commit d68f35b

File tree

1 file changed

+23
-67
lines changed

1 file changed

+23
-67
lines changed

docs/deployment/localDeployment.md

Lines changed: 23 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -78,88 +78,44 @@ cp admin_only/local_deployment.secrets .secrets
7878
```
7979

8080
## Set up the databse
81+
Both options will give you a working BCO DB with a couple of test users, existing BCOs, and some prefixes.
82+
83+
The details for the test data is included in the
8184
### Option #1: Use existing DB
82-
This option will give you a working BCO DB with a couple of test users, existing BCOs, and some prefixes.
85+
8386
```
8487
cp admin/db.sqlite3 .
8588
python3 manage.py migrate
8689
```
8790

88-
91+
```
8992
superusername: bco_api_user
9093
password: testing123
9194
````
9295
9396
---
9497
### Option #2: Create a new DB with test data
95-
Create a DB:
96-
97-
`python3 manage.py migrate`
98-
99-
Load the DB with test data:
100-
101-
`python manage.py loaddata tests/fixtures/testing_data.json`
102-
103-
---
104-
#### Run Server
105-
`python3 manage.py runserver 8080`
106-
107-
Make sure API is accessible via web browser. EX:
108-
````
109-
http://localhost:8080/users/admin/
110-
````
111-
If it worked you should be able to see the API Documentation site at:
112-
113-
`http://localhost:8080/users/docs/`
114-
115-
116-
117-
118-
119-
120-
121-
122-
123-
124-
125-
126-
Option #1: Use existing DB
127-
Copy the dev db
128-
129-
cp ../admin_only/db.sqlite3.dev db.sqlite3
130-
131-
superusername: bco_api_user
132-
password: testing123
133-
Make Migrations
134-
135-
python3 manage.py migrate
136-
137-
Option #2: Create a new DB
138-
Make Migrations
139-
98+
Create a DB and load the DB with test data:
99+
```
140100
python3 manage.py migrate
101+
python manage.py loaddata tests/fixtures/testing_data.json
102+
```
141103
142-
Create a super user for the API:
143-
144-
python3 manage.py createsuperuser
145-
146-
Then follow the prompts
147-
148-
Then: Do a quick check to make sure the server can run
149-
Start the server
150-
151-
python3 manage.py runserver 8000
152-
153-
Make sure API is accessible via web browser.
154-
155-
[YOU WEB HOST HERE]/api/admin/
156-
157-
EX: http://localhost:8000/api/admin/
104+
---
105+
## Run The Server
106+
Start the Django server.
107+
```
108+
python3 manage.py runserver
109+
```
158110
159-
If it worked you should be able to login using the SuperUser credentials you created above
111+
The BCO DB is designed to run on the default django port `8000`. If you want to use another port you can specify that option at the end of the command: `python3 manage.py runserver 8181`
160112
161-
Log in with the superuser credentials you created or imported
113+
Make sure API is accessible via web browser. If it worked you should be able to see the Django Admin site at:
114+
```
115+
http://localhost:8000/api/admin/
116+
```
117+
If it worked you should be able to Log in with the superuser credentials you created or imported
162118
163-
If you copied over the existing dbs you should be able to log in with any of the crednetials listed in /portal_userdb/server/admin/users.tsv
119+
If you copied over the existing dbs you should be able to use any of the tokens[KEYs] listed in the [authtoken_token.tsv](/admin_only/test_database_tables/authtoken_token.tsv) table to submit requests via the [Swagger page](http://localhost:8000/api/docs/)
164120
165-
Otherwise you will have to register a new user.
121+
Otherwise you will have to create a new user. #TODO: Add to FAQs

0 commit comments

Comments
 (0)