# version: '2.2' # services: # main_backend: # build: . # path is relative to docker-compose.yml location # container_name: qrcode_management # volumes: # - .:/src/app # mount point # # env_file: # # - .env # command: python /src/app/manage.py runserver 0.0.0.0:8002 # ports: # - "8002:8002" # restart: unless-stopped version: '2.2' services: main_backend: build: . # path is relative to docker-compose.yml location container_name: qrcode_management volumes: - .:/src/app # mount point command: > sh -c "python /src/app/manage.py makemigrations && python /src/app/manage.py migrate && python /src/app/manage.py runserver 0.0.0.0:8002" ports: - "8002:8002" restart: unless-stopped