Skip to content

Commit 36251e9

Browse files
update installation instructions
1 parent d060acc commit 36251e9

File tree

7 files changed

+52
-7
lines changed

7 files changed

+52
-7
lines changed

README.MD

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,16 @@ The Insurance Sample App demonstrates the following:
5959

6060
1. Download or clone this repository to your workstation in a new folder named **sample-app-insurance-python**.
6161
2. Navigate to that folder: **`cd sample-app-insurance-python`**
62-
3. Install python packages: **`pip install -r requirements.txt`**
63-
4. Install React dependencies using the [npm](https://www.npmjs.com/) package manager: **npm install**
62+
3. Install python packages:
63+
```shell
64+
cd server
65+
pip install -r requirements.txt
66+
```
67+
4. Install React dependencies using the [npm](https://www.npmjs.com/) package manager:
68+
```shell
69+
cd ../client
70+
npm install
71+
```
6472
5. Update the **.env** file with the integration key and other settings.
6573
> **Note:** Protect your integration key and client secret. You should make sure that the **.env** file will not be stored in your source code repository.
6674
6. Navigate to [the admin demo Apps and Keys page](https://admindemo.docusign.com/authenticate?goTo=appsAndKeys), add the Redirect URI http://localhost:3000/callback and then hit save
@@ -86,8 +94,16 @@ All installation scripts are located in the **scripts** folder.
8694
### Manual
8795

8896
1. Navigate to the application folder: **`cd sample-app-insurance-python`**
89-
2. Run the application: **`flask run --port 5001`**
90-
3. Run npm: **`npm start`**
97+
2. Run the application:
98+
```shell
99+
cd server
100+
flask run --port 5001
101+
```
102+
3. Run npm:
103+
```shell
104+
cd ../client
105+
npm start
106+
```
91107
4. Open a browser to **http://localhost:3000**
92108

93109
### Using installation scripts
@@ -97,6 +113,18 @@ All installation scripts are located in the **scripts** folder.
97113
2. Run the application script: **`./run.sh`**
98114
3. Open a browser to **http://localhost:3000**
99115

116+
## Installing anf running the Insurance sample app using Docker
117+
1. Navigate to the application folder: **`cd sample-app-insurance-python`**
118+
2. Install dependencies:
119+
```shell
120+
docker compose build
121+
```
122+
3. Run the app:
123+
```shell
124+
docker compose up
125+
```
126+
4. Open a browser to **http://localhost:80**
127+
100128
### Configuring a Docusign payments gateway
101129
Docusign offers built-in connections to multiple payment gateways. The payments example in this sample app uses a demo account for the Stripe gateway service.
102130

client/.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
REACT_APP_DS_RETURN_URL=http://localhost:3000
2+
REACT_APP_API_BASE_URL=http://localhost:5001/api

scripts/install.bat

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ python -m venv venv
66

77
call ./venv/Scripts/activate
88

9+
cd server
910
pip install --upgrade pip
1011
pip install -r requirements.txt
1112

13+
cd ../client
1214
npm install --no-optional
1315

14-
cd scripts
16+
cd ../scripts

scripts/install.sh

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ python3 -m venv venv
1212
source venv/bin/activate
1313

1414
# Install required python packages
15+
cd server
1516
pip3 install --upgrade pip3
1617
pip3 install -r requirements.txt
1718

1819
# Frontend installation
20+
cd ../client
1921
npm install --no-optional
2022

21-
cd scripts || exit
23+
cd ../scripts || exit

scripts/package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/run.sh

100644100755
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22
cd ..
33
# Activate virtual environment
44
source venv/bin/activate
5+
56
# Run front end
7+
cd client
68
npm start > /dev/null 2>&1 &
9+
710
# Run back end
11+
cd ../server
812
flask run --host 0.0.0.0 --port 5001 > /dev/null 2>&1 &
9-
cd scripts
13+
14+
cd ../scripts

scripts/stop.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)