Created
October 10, 2025 03:46
-
-
Save badri/43b709d1a62249464346609a740bb069 to your computer and use it in GitHub Desktop.
minimal docker compose setup
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
services: | |
db: | |
image: postgres:16 | |
restart: always | |
environment: | |
POSTGRES_USER: dev | |
POSTGRES_PASSWORD: dev | |
POSTGRES_DB: app | |
ports: | |
- "5432:5432" | |
volumes: | |
- pgdata:/var/lib/postgresql/data | |
api: | |
build: . | |
command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload | |
volumes: | |
- .:/app | |
ports: | |
- "8000:8000" | |
environment: | |
DATABASE_URL: postgres://dev:dev@db:5432/app | |
depends_on: | |
- db | |
volumes: | |
pgdata: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment