Skip to content

Commit

Permalink
Fixed default addr for docker
Browse files Browse the repository at this point in the history
  • Loading branch information
fflorent-01 committed May 19, 2023
1 parent 6bd4f5e commit 83e19cd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions backend/api/admin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from .models import User
from django.contrib.auth.models import User
from api import models

# Register your models here.

admin.site.register(User, UserAdmin)
admin.site.register(models.UserProfile)
admin.site.register(models.UserNotificationPreferences)
2 changes: 0 additions & 2 deletions backend/api/urls.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from django.urls import path, include
from .views import auth_views



urlpatterns = [
# auth_urls
path("auth/login/", auth_views.login_view),
Expand Down
1 change: 1 addition & 0 deletions backend/django_server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
load_dotenv()

from django.core.management.commands.runserver import Command as runserver
runserver.default_addr = "0.0.0.0"
runserver.default_port = os.getenv('BACKEND_PORT')

if os.getenv('STAGE') == 'production':
Expand Down
3 changes: 3 additions & 0 deletions backend/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ python manage.py makemigrations

echo "Apply database migrations"
python manage.py migrate

echo "Starting server"
python manage.py runserver
2 changes: 1 addition & 1 deletion docker-compose-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ x-environment:
# DJANGO backend
- HOSTNAME=localhost
- BACKEND_HOST=jasma-api-server
- BACKEND_PORT=5000
- BACKEND_PORT=8000
- SESSION_SECRET="keyboard cat"
# NEXTJS frontend
- NEXTJS_HOST=jasma-client
Expand Down

0 comments on commit 83e19cd

Please sign in to comment.