Skip to content

feat(devcontainer): add database in devcontainer for easier development #11532

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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

damienpontifex
Copy link
Contributor

@damienpontifex damienpontifex commented Jun 8, 2025

Title

Add database in devcontainer for easier development

Relevant issues

N/A

Pre-Submission checklist

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Unchecked items aren't relevant as change is only valid for development of LiteLLM within a VSCode devcontainer and doesn't effect the working codebase/tests etc

Type

🧑‍💻 Development Experience

Changes

  • Use docker compose for VSCode devcontainer setup
    -PostgreSQL server is running alongside the devcontainer
  • Easier development with DATABASE_URL environment variable set to point to that server setup in devcontainer.json
  • Adding .vscode/settings.json with psql connections such that they automatically populate in the PostgreSQL extension, ms-ossdata.vscode-pgsql, so developers can easily query and inspect the database if needed
    • n.b. I realise .vscode/settings.json is gitignored, but I figure this kind of setting is universal to a developer using devcontainers for the litellm repository, so could be added

Screenshot

VSCode LiteLLM devcontainer running LiteLLM as well as querying the local database
image

…d database services

- Result is that a PostgreSQL server is running alongside the devcontainer
- Easier development with `DATABASE_URL` environment variable set to point to that server setup in devcontainer.json
- Adding .vscode/settings.json with `psql` connections such that they automatically populate in the PostgreSQL extension so developers can easily query and inspect the database if needed
  - _n.b. I realise .vscode/settings.json is gitignored, but I figure this kind of setting is universal to a developer for the litellm repository, so could be added_
Copy link

vercel bot commented Jun 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 8, 2025 9:29am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant