LDO-CERT/orochi

django crashing on docker-composer restart

darcosion opened this issue · 3 comments

When a do a sudo docker-compose restart, I have this particular log on django :

django_1     | No changes detected
django_1     | Operations to perform:
django_1     |   Apply all migrations: account, admin, auth, authtoken, contenttypes, django_file_form, guardian, sessions, sites, socialaccount, users, website, ya
django_1     | Running migrations:
django_1     |   No migrations to apply.
django_1     | 
django_1     | You have requested to collect static files at the destination
django_1     | location as specified in your settings:
django_1     | 
django_1     |     /app/staticfiles
django_1     | 
django_1     | This will overwrite existing files!
django_1     | Are you sure you want to do this?
django_1     | 
django_1     | Type 'yes' to continue, or 'no' to cancel: Traceback (most recent call last):
django_1     |   File "/app/manage.py", line 31, in <module>
django_1     |     execute_from_command_line(sys.argv)
django_1     |   File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
django_1     |     utility.execute()
django_1     |   File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 413, in execute
django_1     |     self.fetch_command(subcommand).run_from_argv(self.argv)
django_1     |   File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
django_1     |     self.execute(*args, **cmd_options)
django_1     |   File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute
django_1     |     output = self.handle(*args, **options)
django_1     |   File "/usr/local/lib/python3.9/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 184, in handle
django_1     |     if input(''.join(message)) != 'yes':
django_1     | EOFError: EOF when reading a line
orochi_django exited with code 1

Regards,

It was already fixed in "dev" branch but i made a little fix to make it working also in master.
Sorry for the inconvenience.

No inconvenience, thanks for the work well done !

By the way, a solution was to do that for me :

sudo docker-compose stop
sudo docker-compose down
sudo docker-compose restart

Regards,

In my case also with --skip-checks it continued aksing me yes/no and failing, it seems can be solved adding also --noinput