-
Notifications
You must be signed in to change notification settings - Fork 11
[Fix] Docker Compose, Alembic Migrations, Absolute Imports, and Dev Onboarding for Kodee-demo #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AdnanSattar
wants to merge
11
commits into
hostinger:main
Choose a base branch
from
AdnanSattar:docker-migrations-imports
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c6f431f
docs: update README and env example, simplify Makefile for Docker-nat…
AdnanSattar 143fcbd
feat: modern Docker onboarding, migrations, Makefile, and absolute im…
AdnanSattar 8db04a6
fix: add missing __init__.py files for package imports and remove unu…
AdnanSattar 2311e12
feat: add logger usage in OpenAIChat, chat_service, RedisClient, and …
AdnanSattar 909ca4b
fix: use logging.INFO constant for logger, clean up log parameter usa…
AdnanSattar abb4662
fix: use .get('attempt_number') for retry statistics lookup to preven…
AdnanSattar 833e914
fix: validate OPENAI_API_KEY before client init, raise clear error if…
AdnanSattar bc33bb9
fix: Refactored codebase
AdnanSattar 9584a7c
fix: Refactored codebase V2
AdnanSattar f8d31e4
chore: mark down as a .PHONY target in Makefile fix: catch both Timeo…
AdnanSattar 353c4d1
fix: ensure .get('is_seeking_human_assistance', False) returns boolea…
AdnanSattar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,7 @@ | ||
| OPENAI_API_KEY="" | ||
| DB_HOST = "db" | ||
| DB_NAME = "kodee-demo" | ||
| DB_USERNAME = "kodee-demo" | ||
| DB_PASSWORD = "password" | ||
| REDIS_HOST = "redis" | ||
| REDIS_PORT = "6379" | ||
| REDIS_PASSWORD = "password" | ||
| DB_HOST=db # Docker Compose Postgres service name | ||
| DB_USERNAME=postgres | ||
| DB_PASSWORD=postgres | ||
| DB_NAME=kodee | ||
| REDIS_HOST=redis # Docker Compose Redis service name | ||
| REDIS_PASSWORD=localpass | ||
| OPENAI_API_KEY=sk-xxx # Your OpenAI key if needed | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,17 @@ | ||
| setup: first_run create_venv install_alembic run_migrations | ||
| # Makefile for Docker-native development workflow | ||
| # Use these commands for all regular development tasks | ||
|
|
||
| # Start all services using Docker Compose and build if needed | ||
| up: | ||
| docker-compose -f docker-compose.yml up --build | ||
| docker compose up --build -d | ||
|
|
||
| first_run: | ||
| docker-compose -f docker-compose.yml up --build -d | ||
| # Stop and remove all services and persistent volumes | ||
| # down: | ||
| # docker compose down -v | ||
|
|
||
| create_venv: | ||
| python3 -m venv .venv | ||
| @echo "Virtual environment created." | ||
| # Run Alembic database migrations inside Docker | ||
| migrate: | ||
| docker compose exec web alembic upgrade head | ||
|
|
||
| install_alembic: | ||
| . .venv/bin/activate; pip install alembic psycopg2-binary python-dotenv | ||
| @echo "Alembic and psycopg2 installed in the virtual environment." | ||
|
|
||
| run_migrations: | ||
| . .venv/bin/activate; sleep 5; export DB_HOST=localhost; alembic upgrade head | ||
| @echo "Alembic migrations applied." | ||
| # Setup = up + migrate, for convenience | ||
| setup: up migrate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.