Trouble with Docker and Colima: Django Container Not Reflecting Code Changes Until Docker Restart

69 Views Asked by At

I'm using colima version 0.5.6 to run Docker. I have three containers: Django, .... I'm encountering a problem with the Django container.When I edit the code and save it, no changes appear on the interface, even after refreshing the page. The only way to see the changes is by executing the following command: docker restart django. the same config works. with docker descktop.

i checked the yaml file and it already contains this line :restart: unless-stopped in the container config:

services:
  django:
    build:
      context: .
      dockerfile: ./compose/local/django/Dockerfile
    image: local_django
    container_name: django
    depends_on:
      - mysql
    volumes:
      - .:/app:z
    env_file:
      - ./.envs/.local/.django
      - ./.envs/.local/.s3
      - ./.envs/.local/.mysql
    ports:
      - "8000:8000"
    command: /start
    restart: unless-stopped
    platform: linux/x86_64
0

There are 0 best solutions below