Skip to content

Commit

Permalink
Ref #207 - Fix minor issues about database
Browse files Browse the repository at this point in the history
- Run makemigrations for each app separately in Dockerfile
- Set HOST to database in settings
  • Loading branch information
Kerem Zaman committed Dec 10, 2021
1 parent bd9eb9a commit be971ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ RUN pip install -r requirements.txt
ADD . /
WORKDIR /

CMD python manage.py makemigrations && python manage.py migrate && python manage.py runserver 0.0.0.0:9000
CMD python manage.py makemigrations authentication && python manage.py makemigrations eventposts && python manage.py migrate && python manage.py runserver 0.0.0.0:9000

EXPOSE 9000
2 changes: 1 addition & 1 deletion backend/app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@

'PASSWORD': os.environ.get('POSTGRES_PASSWORD', None),

'HOST': 'localhost' if DEBUG else 'database',
'HOST': 'database',

'PORT': '5432',

Expand Down

0 comments on commit be971ab

Please sign in to comment.