Skip to content

Commit

Permalink
configured docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
bzzz-coding committed Aug 16, 2024
1 parent d487416 commit d6c0a48
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ dev/linter.env
.DS_store

.idea
data
2 changes: 1 addition & 1 deletion backend/api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
'NAME': 'yourdatabase',
'USER': 'yourusername',
'PASSWORD': 'yourpassword',
'HOST': 'localhost',
'HOST': 'db',
'PORT': 5432, #default port you don't need to mention in docker-compose
}
}
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.9" # Use the version of Docker Compose that you need

services:
db:
image: postgres # Use the latest PostgreSQL image
image: postgres:12 # Use the latest PostgreSQL image
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
Expand All @@ -14,6 +14,7 @@ services:
backend:
build: ./backend
command: python manage.py runserver 0.0.0.0:8000
restart: on-failure:10
volumes:
- .:/code
ports:
Expand Down

0 comments on commit d6c0a48

Please sign in to comment.