Skip to content

Commit

Permalink
rework docker-compose.dev
Browse files Browse the repository at this point in the history
  • Loading branch information
djeck1432 committed Dec 1, 2024
1 parent b09c6d5 commit 37a8904
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions docker-compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ services:
container_name: backend_dev
volumes:
- ./entrypoint.sh:/app/entrypoint.sh
- .:/app # Mount the entire project for easy code updates
- .:/app
env_file:
- .env.dev # Use a different environment file for local development
expose:
- "8000"
- .env.dev
ports:
- "8000:8000" # Expose backend to localhost
- "8000:8000"
networks:
- app_network
depends_on:
Expand All @@ -41,9 +39,9 @@ services:
networks:
- app_network
ports:
- "${DB_PORT:-5432}:5432" # Use environment variable for port mapping
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
Expand All @@ -63,4 +61,4 @@ services:
- backend

volumes:
postgres_data_dev:
postgres_data_dev:

0 comments on commit 37a8904

Please sign in to comment.