My static files are served with no issue when Debug = True. I have read the documentation on https://docs.djangoproject.com/en/1.8/howto/static-files/deployment/ but still cannot get it to work when Debug = False. These are my settings (works fine when Debug = True):
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
STATIC_URL = 'myapp/static/'
STATIC_ROOT = os.path.join(os.path.dirname(BASE_DIR),"myapp","static","static-only")
STATICFILES_DIRS = (
os.path.join(os.path.dirname(BASE_DIR),"myapp","static"),
)
I have edited the config file to be:
container_commands:
collectstatic:
command: "myapp/manage.py collectstatic --noinput"
option_settings:
"aws:elasticbeanstalk:application:environment":
DJANGO_SETTINGS_MODULE: "myapp.settings"
PYTHONPATH: "/opt/python/current/app/myapp:$PYTHONPATH"
"aws:elasticbeanstalk:container:python":
WSGIPath: "myapp/myapp/wsgi.py"
"aws:elasticbeanstalk:container:python:staticfiles":
"/static/": "myapp/static/"
I have been banging my head on this for some time so any help would be much appreciated!