Django template does not exist?

When I am trying to deploy to railway my project, i get the error mentioned above. This is one log that could give more insight? django.template.loaders.filesystem.Loader: /app/client/client/public/index.html (Source does not exist)

Here is my project.settings.py file:

from pathlib import Path
import os

BASE_DIR = Path(__file__).resolve().parent.parent
    
DEBUG = True

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'client')
      ],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]

WSGI_APPLICATION = 'project.wsgi.application'

DATABASES = {
    'default': {
      'ENGINE': 'django.db.backends.postgresql_psycopg2',
      'NAME': 'game-api',
      'HOST': 'localhost',
      'PORT': 5432
    }
}


ROOT_URLCONF = 'project.urls'

STATIC_URL = '/static/'

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

import dj_database_url
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)

STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'

project.views.py file:

from django.shortcuts import render

def index(request):
    return render(request, 'build/index.html')

My files:

enter image description here

Back to Top