diff --git a/Backend/user_management/Dockerfile b/Backend/user_management/Dockerfile index eaa5c8b..86cfa8b 100644 --- a/Backend/user_management/Dockerfile +++ b/Backend/user_management/Dockerfile @@ -39,6 +39,6 @@ RUN chown -R postgres:postgres /etc/supervisor && \ USER postgres -HEALTHCHECK --interval=30s --timeout=2s --start-period=5s --retries=3 CMD curl -sSf http://localhost:8000/user/register/ > /dev/null && echo "success" || echo "failure" +HEALTHCHECK --interval=30s --timeout=2s --start-period=5s --retries=3 CMD curl -sSf http://localhost:8001/user/register/ > /dev/null && echo "success" || echo "failure" ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] diff --git a/Backend/user_management/run_consumer.sh b/Backend/user_management/run_consumer.sh index 6bfcf5a..f8adfa2 100644 --- a/Backend/user_management/run_consumer.sh +++ b/Backend/user_management/run_consumer.sh @@ -1,7 +1,7 @@ #!/bin/bash # URL of the Django application -DJANGO_URL="http://user-service:8001/user/register/" +DJANGO_URL="http://localhost:8001/user/register/" # Wait until Django server is available while ! curl -s "${DJANGO_URL}" >/dev/null; do diff --git a/Backend/user_management/tools.sh b/Backend/user_management/tools.sh index 85c6ae7..1cde498 100644 --- a/Backend/user_management/tools.sh +++ b/Backend/user_management/tools.sh @@ -15,5 +15,5 @@ python3 /app/user_management/manage.py makemigrations users python3 /app/user_management/manage.py migrate echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('${DB_USER}', 'admin@example.com', '${DB_USER}')" | python3 /app/user_management/manage.py shell && echo "Superuser created successfully." # python3 /app/user_management/manage.py runserver 0.0.0.0:8001 -cd app/user_management -daphne -b 0.0.0.0 -p 8000 user_management.asgi:application +cd /app/user_management +daphne -b 0.0.0.0 -p 8001 user_management.asgi:application diff --git a/Backend/user_management/user_management/user_management/settings.py b/Backend/user_management/user_management/user_management/settings.py index f7b948a..97cbc75 100644 --- a/Backend/user_management/user_management/user_management/settings.py +++ b/Backend/user_management/user_management/user_management/settings.py @@ -38,7 +38,7 @@ '127.0.0.1', '[::1]', 'user-service', - 'user-service:8000', + 'user-service:8001', ] diff --git a/docker-compose.yml b/docker-compose.yml index 62b27a9..d9c1e17 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,8 +26,8 @@ services: dockerfile: Backend/user_management/Dockerfile env_file: - .env - ports: - - 8001:8001 + # ports: + # - 8001:8001 networks: - transcendence_network depends_on: @@ -41,8 +41,8 @@ services: dockerfile: Backend/auth_service/Dockerfile env_file: - .env - ports: - - 8000:8000 + # ports: + # - 8000:8000 networks: - transcendence_network depends_on: