fix: docker should not wait for user input
After running collectstatic
once locally, if you try to docker compose up
, it will ask whether to overwrite existing static files, and then error out because, I presume, it was waiting too long.
0.900 File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
0.900 You have requested to collect static files at the destination
0.900 location as specified in your settings:
0.900
0.900 /app/staticfiles
0.900
0.900 This will overwrite existing files!
0.900 Are you sure you want to do this?
0.900
0.900 Type 'yes' to continue, or 'no' to cancel:
...
0.909 File "/usr/local/lib/python3.12/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 206, in handle
0.909 if input("".join(message)) != "yes":
0.909 ^^^^^^^^^^^^^^^^^^^^^^^
0.909 EOFError: EOF when reading a line
------
failed to solve: process "/bin/sh -c python manage.py collectstatic" did not complete successfully: exit code: 1
So I added the --no-input flag. Not sure if it's even needed in prod/test since it should be all in docker. But if we run into other timeouts because it randomly decides to ask for user input then it might be useful...