Skip to content

Commit de37303

Browse files
authored
Updated README to install the correct dependencies to use psycopg2 (#125)
*Description of changes:* Updated README to install the correct dependencies to use psycopg2 for EC2 sample app setup compared to using psycopg2-binary or pulse instrumentation. Also added instructions for some required env variables for the image service. *Testing:* Tested by deploying to EC2 and after instrumentation, we can now see the postgres db node while with binary, we weren't able to see it. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
1 parent 6320522 commit de37303

File tree

1 file changed

+13
-0
lines changed
  • sample-applications/vehicle-dealership-sample-app

1 file changed

+13
-0
lines changed

sample-applications/vehicle-dealership-sample-app/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ To deploy to EC2, you will have to go through the following steps.
6161
```
6262
sudo dnf install python3.11
6363
sudo dnf install python3.11-pip
64+
sudo dnf install python3.11-devel
6465
sudo dnf install postgresql15
66+
sudo dnf install postgresql-devel
67+
sudo dnf install gcc*
6568
6669
createdb vehicle_inventory -h <rds_url> -U root
6770
createuser djangouser -h <rds_url> -U root
@@ -95,6 +98,10 @@ python3.11 manage.py migrate --noinput && python3.11 manage.py runserver 0.0.0.0
9598
```
9699
sudo dnf install python3.11
97100
sudo dnf install python3.11-pip
101+
sudo dnf install python3.11-devel
102+
sudo dnf install postgresql15
103+
sudo dnf install postgresql-devel
104+
sudo dnf install gcc*
98105
99106
aws s3 sync s3://<s3_bucket_that_has_python_code> .
100107
@@ -103,6 +110,12 @@ cd to the image microservice directory and run:
103110
python3.11 -m pip install -r requirements.txt
104111
105112
Create a .env file with the following:
113+
POSTGRES_ROOT_PASSWORD=<password_from_RDS_setup>
114+
POSTGRES_DATABASE=vehicle_inventory
115+
POSTGRES_USER=djangouser
116+
POSTGRES_PASSWORD=<password_from_this_step>
117+
DB_SERVICE_HOST=<RDS_DB_endpoint>
118+
DB_SERVICE_PORT=5432
106119
S3_BUCKET=<s3_bucket_to_host_images>
107120
108121
python3.11 manage.py migrate --noinput && python3.11 manage.py runserver 0.0.0.0:8000

0 commit comments

Comments
 (0)