Skip to content

Commit

Permalink
fix: compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamSilveiraF committed Oct 29, 2023
1 parent 3763dac commit b53ee12
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@ This is a sentiment analysis API developed with FastAPI
Create a file named `.env` in the project root directory and add your configurations, following the example below:

```env
POSTGRES_DB=sentimentanalysis_db
POSTGRES_USER=username
POSTGRES_PASSWORD=password
HOST=localhost | db | IP
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${HOST}:5432/${POSTGRES_DB}
GCP_CREDENTIALS_FILE=gcp.json
DATABASE_URL=postgresql://william:password@db:5432/sentimentanalysis_db
```

Google Cloud Credentials

To authenticate with the Google Cloud Platform, you'll need to create a service account, download the JSON key file, and set the GCP_CREDENTIALS_FILE environment variable in your .env file to point to this key file.
```python
export GOOGLE_APPLICATION_CREDENTIALS="gcp.json"
```

To authenticate with the Google Cloud Platform, you'll need to create a service account and download the JSON key file. Futhermore, rename as gcp.json and put in the base of project /.


```json
Expand Down
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ services:
- mynet
volumes:
- uploaded_audio:/app/uploaded_audio
- ./${GCP_CREDENTIALS_FILE}:/app/${GCP_CREDENTIALS_FILE}
- ./gcp.json:/app/gcp.json
environment:
- GOOGLE_APPLICATION_CREDENTIALS=/app/${GCP_CREDENTIALS_FILE}
- GOOGLE_APPLICATION_CREDENTIALS=/app/gcp.json
db:
image: postgres:16
container_name: sentimentanalysis-db
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: sentimentanalysis_db
POSTGRES_USER: william
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
volumes:
Expand Down
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ httptools==0.6.1
httpx==0.25.0
huggingface-hub==0.17.3
idna==3.4
iniconfig==2.0.0
itsdangerous==2.1.2
Jinja2==3.1.2
kiwisolver==1.4.5
Expand All @@ -50,6 +51,7 @@ nvidia-nvtx-cu12==12.1.105
orjson==3.9.9
packaging==23.2
Pillow==10.0.1
pluggy==1.3.0
proto-plus==1.22.3
protobuf==4.21.12
psycopg2-binary==2.9.9
Expand All @@ -62,6 +64,7 @@ pydantic_core==2.10.1
pydub==0.25.1
PyMySQL==1.1.0
pyparsing==3.1.1
pytest==7.4.3
python-dateutil==2.8.2
python-decouple==3.8
python-dotenv==1.0.0
Expand All @@ -78,6 +81,7 @@ SQLAlchemy==2.0.22
starlette==0.27.0
sympy==1.12
tokenizers==0.14.1
tomli==2.0.1
torch==2.1.0
torchaudio==2.1.0
torchvision==0.16.0
Expand Down

0 comments on commit b53ee12

Please sign in to comment.