Saleor: Celery generates thumbnails in infinite loop

Created on 15 Oct 2018  路  6Comments  路  Source: mirumee/saleor

What I'm trying to achieve

Run Saleor with Docker

Steps to reproduce the problem

  1. docker-compose build
  2. docker-compose run web python3 manage.py migrate
  3. docker-compose run web python3 manage.py collectstatic
  4. docker-compose run web python3 manage.py populatedb --createsuperuser
  5. Celery generate thumbnails in infinite loop

This doesn't happen every time. Cann't specify the conditions.

Screenshots

image

System information
Operating system: macOS High Sierra Version: 10.13.6

bug

Most helpful comment

Note that we should always provide examples using --rm when using docker-compose run as skipping it will result in leftover junk even when restarting is disabled.

All 6 comments

The problem is that docker-compose is set to restart all containers so unless you explicitly pass --rm to docker run, both the populatedb and the collectstatic commands will be executed over and over again.

@patrys Can we fix that in Dockerfile or docker-compose config?

Yes, I'd suggest to start by dropping all restart: unless-stopped or at the very least change them to restart: on-failure .

The choices really are:

  1. To set restart to restart: "no"

options:

restart: "no"
restart: always
restart: on-failure
restart: unless-stopped 

removing restart: will default to "no"

or

  1. To document that docker-compose run --rm web python3 manage.py migrate instead of docker-compose run web python3 manage.py migrate

or

  1. To document

docker-compose exec web python3 manage.py migrate or similar docker-compose exec bash -c 'python3 manage.py migrate'

Note that we should always provide examples using --rm when using docker-compose run as skipping it will result in leftover junk even when restarting is disabled.

This issue should be already resolved, using --rm has been documented.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tanvirraj picture tanvirraj  路  3Comments

ghost picture ghost  路  4Comments

jujes picture jujes  路  4Comments

lewis617 picture lewis617  路  3Comments

mad-anne picture mad-anne  路  3Comments