Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static Assets #13

iammerrick opened this issue Nov 7, 2015 · 4 comments

Static Assets #13

iammerrick opened this issue Nov 7, 2015 · 4 comments


Copy link

iammerrick commented Nov 7, 2015

Any way to let Django serve the static assets if collectstatic hasn't been run yet? It's sort of a pain to run collectstatic each time you know?

Copy link

mjhea0 commented Dec 28, 2015

You could add it to a shell script:

python /app/ collectstatic --noinput
/usr/local/bin/gunicorn docker_django.wsgi:application -w 2 -b :8000

Then in the production.yml file just run the shell script:

  restart: always
  build: ./web
    - "8000"
    - postgres:postgres
    - redis:redis
  env_file: .env
  command: /

Copy link

viktorvillalobos commented Nov 30, 2017

This give me an error:

web_1 | usage: collectstatic [-h] [--version] [-v {0,1,2,3}]
web_1 | [--settings SETTINGS] [--pythonpath PYTHONPATH]
web_1 | [--traceback] [--no-color] [--noinput]
web_1 | [--no-post-process] [-i PATTERN] [-n] [-c] [-l]
web_1 | [--no-default-ignore]
web_1 | collectstatic: error: unrecognized arguments: --noinput

Copy link

mmichealjroberts commented May 16, 2019

This isn't working in the production deployment.

Copy link

hashlash commented Aug 16, 2020

web_1 | collectstatic: error: unrecognized arguments: --noinput

@viktorvillalobos It may be caused by CR line endings. See

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

5 participants