diff --git a/docker-compose.yml b/docker-compose.yml index 6e1f9b28432ea3fa80f720d17518f3ec78561a87..e0ccc0ba1d3c4acb7a668a16077c33262e90bcc1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,9 +2,9 @@ services: register: build: . container_name: register - command: bash -c "python register/manage.py makemigrations && python register/manage.py migrate && python register/manage.py runserver 0.0.0.0:8001" + command: bash -c "python src/register/manage.py makemigrations && python src/register/manage.py migrate && python src/register/manage.py runserver 0.0.0.0:8001" volumes: - - .:/src/ + - .:/src ports: - "8001:8001" depends_on: @@ -12,9 +12,9 @@ services: main: build: . container_name: main - command: bash -c "python main/manage.py makemigrations contact && python main/manage.py migrate contact && python main/manage.py runserver 0.0.0.0:8000" + command: bash -c "python src/main/manage.py makemigrations contact && python src/main/manage.py migrate contact && python src/main/manage.py runserver 0.0.0.0:8000" volumes: - - .:/src/ + - .:/src ports: - "8000:8000" depends_on: @@ -22,9 +22,9 @@ services: posts: build: . container_name: posts - command: bash -c "python post/manage.py makemigrations postapp && python post/manage.py migrate postapp && python post/manage.py runserver 0.0.0.0:8002" + command: bash -c "python src/post/manage.py makemigrations postapp && python src/post/manage.py migrate postapp && python src/post/manage.py runserver 0.0.0.0:8002" volumes: - - .:/src/ + - .:/src ports: - "8002:8002" depends_on: @@ -32,9 +32,9 @@ services: profiles: build: . container_name: profiles - command: bash -c "python profiles/manage.py makemigrations profileapp && python profiles/manage.py migrate profileapp && python profiles/manage.py runserver 0.0.0.0:8003" + command: bash -c "python src/profiles/manage.py makemigrations profileapp && python src/profiles/manage.py migrate profileapp && python src/profiles/manage.py runserver 0.0.0.0:8003" volumes: - - .:/src/ + - .:/src ports: - "8003:8003" depends_on: diff --git a/main/main/__pycache__/settings.cpython-312.pyc b/main/main/__pycache__/settings.cpython-312.pyc index 4bd63f4723e16926e951b1c6b7a663cde7c4fcc0..59b6b26d9549366b7c54263b9655b2b101db3869 100644 Binary files a/main/main/__pycache__/settings.cpython-312.pyc and b/main/main/__pycache__/settings.cpython-312.pyc differ diff --git a/main/main/settings.py b/main/main/settings.py index d85ea32dd8744664f64399a86c5da8c84e831b18..9d9c99cde21c82235032f38b160b30d800a1030f 100644 --- a/main/main/settings.py +++ b/main/main/settings.py @@ -16,11 +16,11 @@ from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -sys.path.append('/') +sys.path.append('/src/') STATIC_ROOT = os.path.join("static_root") MEDIA_URL = '/media/' -MEDIA_ROOT = os.path.join('media') +MEDIA_ROOT = os.path.join('/src/media') # Quick-start development settings - unsuitable for production @@ -32,7 +32,7 @@ SECRET_KEY = 'django-insecure-72ga@80_fve=s&97y(m-+68w$)$lt-@$r20eq&h6tm6w-o)&$@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = ['*'] +ALLOWED_HOSTS = ['*', '0.0.0.0', 'localhost'] # Application definition @@ -66,7 +66,7 @@ ROOT_URLCONF = 'main.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [os.path.join('templates'),], + 'DIRS': [os.path.join('/src/templates'),], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -144,7 +144,7 @@ STATIC_URL = '/static/' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' -STATIC_ROOT = os.path.join('static') +STATIC_ROOT = os.path.join('/src/static') SASS_PROCESSOR_ROOT=STATIC_ROOT STATICFILES_FINDERS=[ 'django.contrib.staticfiles.finders.FileSystemFinder', diff --git a/post/post/__pycache__/settings.cpython-312.pyc b/post/post/__pycache__/settings.cpython-312.pyc index 8c0dc434be86130365954cc8c42c67de2b6a0303..16d80e622bfa98cf2585b0e53f909d11aff37096 100644 Binary files a/post/post/__pycache__/settings.cpython-312.pyc and b/post/post/__pycache__/settings.cpython-312.pyc differ diff --git a/post/post/settings.py b/post/post/settings.py index 5aa93d4644efa13c306c471a87e73166a64f09ef..70687a0fce4d5c59befa2c916df5f9aeb212d907 100644 --- a/post/post/settings.py +++ b/post/post/settings.py @@ -16,11 +16,11 @@ from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -sys.path.append('/') +sys.path.append('/src/') STATIC_ROOT = os.path.join("static_root") MEDIA_URL = '/media/' -MEDIA_ROOT = os.path.join('media') +MEDIA_ROOT = os.path.join('/src/media') # Quick-start development settings - unsuitable for production @@ -32,7 +32,7 @@ SECRET_KEY = 'django-insecure-72ga@80_fve=s&97y(m-+68w$)$lt-@$r20eq&h6tm6w-o)&$@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = ['*'] +ALLOWED_HOSTS = ['*', '0.0.0.0', 'localhost'] # Application definition @@ -68,7 +68,7 @@ ROOT_URLCONF = 'post.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [os.path.join('templates'),], + 'DIRS': [os.path.join('/src/templates'),], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -146,7 +146,7 @@ STATIC_URL = '/static/' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' -STATIC_ROOT = os.path.join('static') +STATIC_ROOT = os.path.join('/src/static') SASS_PROCESSOR_ROOT=STATIC_ROOT STATICFILES_FINDERS=[ 'django.contrib.staticfiles.finders.FileSystemFinder', diff --git a/profiles/profiles/__pycache__/settings.cpython-312.pyc b/profiles/profiles/__pycache__/settings.cpython-312.pyc index a343a80fa0ce5e222621d5eba59d817925824e14..9cca8bf8d4aae59af749c65c7b250ff757bb8a87 100644 Binary files a/profiles/profiles/__pycache__/settings.cpython-312.pyc and b/profiles/profiles/__pycache__/settings.cpython-312.pyc differ diff --git a/profiles/profiles/settings.py b/profiles/profiles/settings.py index 4c62f70ac88d5e3621eb6f8c0cce5c05f48db09c..0ff8c6466cf587187c084fad6c2e340e6356cb6e 100644 --- a/profiles/profiles/settings.py +++ b/profiles/profiles/settings.py @@ -16,11 +16,11 @@ from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -sys.path.append('/') +sys.path.append('/src/') STATIC_ROOT = os.path.join("static_root") MEDIA_URL = '/media/' -MEDIA_ROOT = os.path.join('media') +MEDIA_ROOT = os.path.join('/src/media') # Quick-start development settings - unsuitable for production @@ -32,7 +32,7 @@ SECRET_KEY = 'django-insecure-72ga@80_fve=s&97y(m-+68w$)$lt-@$r20eq&h6tm6w-o)&$@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = ['*'] +ALLOWED_HOSTS = ['*', '0.0.0.0', 'localhost'] # Application definition @@ -66,7 +66,7 @@ ROOT_URLCONF = 'profiles.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [os.path.join('templates'),], + 'DIRS': [os.path.join('/src/templates'),], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -144,7 +144,7 @@ STATIC_URL = '/static/' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' -STATIC_ROOT = os.path.join('static') +STATIC_ROOT = os.path.join('/src/static') SASS_PROCESSOR_ROOT=STATIC_ROOT STATICFILES_FINDERS=[ 'django.contrib.staticfiles.finders.FileSystemFinder', diff --git a/register/register/__pycache__/settings.cpython-312.pyc b/register/register/__pycache__/settings.cpython-312.pyc index aa69ae853d8cf4ab764806edb5bf98b1d95efcec..c396ce197d2a0c7802cc66be91ba229c374450ce 100644 Binary files a/register/register/__pycache__/settings.cpython-312.pyc and b/register/register/__pycache__/settings.cpython-312.pyc differ diff --git a/register/register/settings.py b/register/register/settings.py index ca257eb106e78337022fe430c662f200861d1bb7..cd481da5e9247d1aaac9b2f222c6db6c955fc945 100644 --- a/register/register/settings.py +++ b/register/register/settings.py @@ -16,11 +16,11 @@ from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -sys.path.append('/') +sys.path.append('/src/') STATIC_ROOT = os.path.join("static_root") MEDIA_URL = '/media/' -MEDIA_ROOT = os.path.join('media') +MEDIA_ROOT = os.path.join('/src/media') # Quick-start development settings - unsuitable for production @@ -32,7 +32,7 @@ SECRET_KEY = 'django-insecure-72ga@80_fve=s&97y(m-+68w$)$lt-@$r20eq&h6tm6w-o)&$@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = ['*'] +ALLOWED_HOSTS = ['*', '0.0.0.0', 'localhost'] # Application definition @@ -64,7 +64,7 @@ ROOT_URLCONF = 'register.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [os.path.join('templates'),], + 'DIRS': [os.path.join('/src/templates'),], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -142,7 +142,7 @@ STATIC_URL = '/static/' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' -STATIC_ROOT = os.path.join('static') +STATIC_ROOT = os.path.join('src/static') SASS_PROCESSOR_ROOT=STATIC_ROOT STATICFILES_FINDERS=[ 'django.contrib.staticfiles.finders.FileSystemFinder', diff --git a/templates/base.html b/templates/base.html index c42b8cad67cccbe6174d54e63a35ac123a1d3847..e830139b4fe95b0cb68bf79db64317cf0796d775 100644 --- a/templates/base.html +++ b/templates/base.html @@ -12,7 +12,7 @@ function confirmLogoff() { var confirmation = confirm("Are you sure you want to log out?"); if (confirmation) { - window.location.href = "http://127.0.0.1:8001"; // Redirect to home after logoff + window.location.href = "http://localhost:8001"; // Redirect to home after logoff } } </script> @@ -24,12 +24,12 @@ <div class="username">{{ username }}</div> </div> <div class="navbar-right"> - <a href="http://127.0.0.1:8001/register/welcome">Home</a> - <a href="http://127.0.0.1:8002/post/feed">Feed</a> - <a href="http://127.0.0.1:8002/post/newPost">Add Photos</a> - <a href="http://127.0.0.1:8003/profile">Profile</a> - <a href="http://127.0.0.1:8000/contact">Contact</a> - <a href="http://127.0.0.1:8000/about">About Us</a> + <a href="http://localhost:8001/register/welcome">Home</a> + <a href="http://localhost:8002/post/feed">Feed</a> + <a href="http://localhost:8002/post/newPost">Add Photos</a> + <a href="http://localhost:8003/profile">Profile</a> + <a href="http://localhost:8000/contact">Contact</a> + <a href="http://localhost:8000/about">About Us</a> <a href="#" onclick="confirmLogoff()">Log Off</a> </div> </div>