Skip to content

Commit 0076e10

Browse files
Cleanup instructions (#91)
* update installation instructions
1 parent d060acc commit 0076e10

File tree

7 files changed

+62
-9
lines changed

7 files changed

+62
-9
lines changed

README.MD

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,30 @@ 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.
65-
> **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.
66-
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
73+
> **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.
74+
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 generate your RSA key pair if you haven't already.
6775

6876
> **Note:** You should add a dynamic content properties to your clickwrap by following this [instruction](https://developers.docusign.com/docs/click-api/click101/customize-elastic-template-fields/) before using it in the sample app.
6977
78+
7. Update the **private.key** file with your private RSA key.
79+
8. Copy your **.env** and your **private.key** files into the server folder
80+
```shell
81+
cd ../
82+
cp .env server/.env
83+
cp private.key server/private.key
84+
```
85+
7086
**Using installation scripts**
7187

7288
1. Download or clone this repository to your workstation in a new folder named **sample-app-insurance-python**.
@@ -86,8 +102,16 @@ All installation scripts are located in the **scripts** folder.
86102
### Manual
87103

88104
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`**
105+
2. Run the application:
106+
```shell
107+
cd server
108+
flask run --port 5001
109+
```
110+
3. Run npm:
111+
```shell
112+
cd ../client
113+
npm start
114+
```
91115
4. Open a browser to **http://localhost:3000**
92116

93117
### Using installation scripts
@@ -97,6 +121,18 @@ All installation scripts are located in the **scripts** folder.
97121
2. Run the application script: **`./run.sh`**
98122
3. Open a browser to **http://localhost:3000**
99123

124+
## Installing anf running the Insurance sample app using Docker
125+
1. Navigate to the application folder: **`cd sample-app-insurance-python`**
126+
2. Install dependencies:
127+
```shell
128+
docker compose build
129+
```
130+
3. Run the app:
131+
```shell
132+
docker compose up
133+
```
134+
4. Open a browser to **http://localhost:80**
135+
100136
### Configuring a Docusign payments gateway
101137
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.
102138

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)