6

I finished a Dokku deployment on a Digitalocean server. My application seems to work, except for my static files.

Here are the relevant parts of my settings.py file:

PROJECT_DIR = Path(__file__).absolute().ancestor(2)

MEDIA_ROOT = ''
MEDIA_URL = ''
STATIC_ROOT = ''
STATIC_URL = '/static/'

STATICFILES_DIRS = (
    PROJECT_DIR.child('static'),
)

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

STATIC_ROOT = PROJECT_DIR.child('staticroot')

Does someone know how can I point my app at my static files on a Dokku based system?

Though it's not answering my question, we're currently serving the static files from AWS S3, and that works. It makes my question less urgent, but I still would like to know if it is possible to solve it "locally".

halfer
  • 19,824
  • 17
  • 99
  • 186
Shai Efrati
  • 516
  • 1
  • 7
  • 27

1 Answers1

-2

You may need to do a few things

  1. run ./manage.py collectstatic to move static files to your static folder
  2. Update your web server config so that /static/ points to the static folder.

Have you done this already?

tr33hous
  • 1,622
  • 1
  • 15
  • 26