Skip to content

Commit

Permalink
refactor: update envs and docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
589hero committed Dec 20, 2024
1 parent 0c0fc7d commit 10c1a48
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BROKER_BASE_URI=amqp://<user_name>:<password>@<rabbitmq_container_name>:5672
DATABASE_URL=<filebase_database_url>
STORAGE_BUCKET=<filebase_storage_bucket>
APP_NAME=text-to-art
FIREBASE_DATABASE_URL=<filebase_database_url>
FIREBASE_STORAGE_BUCKET=<filebase_storage_bucket>
FIREBASE_APP_NAME=text-to-art
8 changes: 2 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ version: '3'

services:
stable-diffusion-v2:
build:
context: .
dockerfile: Dockerfile
image: devainetwork/tti-worker
container_name: stable-diffuion-v2-worker
env_file:
- .env
Expand All @@ -25,9 +23,7 @@ services:
capabilities: [gpu]

stable-diffusion-v2-1:
build:
context: .
dockerfile: Dockerfile
image: devainetwork/tti-worker
container_name: stable-diffuion-v2-1-worker
env_file:
- .env
Expand Down
4 changes: 2 additions & 2 deletions src/configs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class ModelSettings(BaseSettings):

class FirebaseSettings(BaseSettings):
cred_path: str = "/app/key/serviceAccountKey.json"
database_url: str
storage_bucket: str
firebase_database_url: str
firebase_storage_bucket: str
app_name: str = "text-to-art"


Expand Down
2 changes: 1 addition & 1 deletion src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from schemas import ImageGenerationResponse, ImageGenerationResult, ImageGenerationWorkerOutput


app_name = firebase_settings.app_name
app_name = firebase_settings.firebase_app_name


def clear_memory() -> None:
Expand Down
4 changes: 2 additions & 2 deletions src/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
firebase_admin.initialize_app(
cred,
{
"databaseURL": firebase_settings.database_url,
"storageBucket": firebase_settings.storage_bucket,
"databaseURL": firebase_settings.firebase_database_url,
"storageBucket": firebase_settings.firebase_storage_bucket,
},
)

0 comments on commit 10c1a48

Please sign in to comment.